Skip to content

Commit 071b3d2

Browse files
committed
[test] trying to reproduce an issue with insert not returning id - without luck (#690)
1 parent eb16ad9 commit 071b3d2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/db/postgresql/simple_test.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,27 @@ def test_custom_select_decimal
6666
end
6767
end
6868

69+
class Payment < ActiveRecord::Base; end
70+
71+
# @override
72+
def test_insert_returns_id
73+
super
74+
75+
# begin
76+
# connection.create_table 'payments', :force => true do |t|
77+
# t.integer "amount"
78+
# t.text "notes"
79+
# t.datetime "created_at", :null => false
80+
# t.datetime "updated_at", :null => false
81+
# end
82+
#
83+
# p = Payment.create!
84+
# assert p.id
85+
# ensure
86+
# connection.drop_table 'payments' rescue nil
87+
# end
88+
end
89+
6990
def test_encoding
7091
assert_not_nil connection.encoding
7192
end

0 commit comments

Comments
 (0)