Skip to content

Commit 8f958f4

Browse files
author
Artūrs Mekšs
committed
Fix: assertion and test for composite_primary_keys
1 parent 7eb1139 commit 8f958f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/annotate/annotate_models_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def mock_column(name, type, options={})
7272
end
7373

7474
it "should get schema info even if the primary key is array, if using composite_primary_keys" do
75-
klass = mock_class(:users, nil, [
75+
klass = mock_class(:users, [:a_id, :b_id], [
7676
mock_column(:a_id, :integer),
7777
mock_column(:b_id, :integer),
7878
mock_column(:name, :string, :limit => 50)
@@ -83,8 +83,8 @@ def mock_column(name, type, options={})
8383
#
8484
# Table name: users
8585
#
86-
# a_id :integer not null
87-
# b_id :integer not null
86+
# a_id :integer not null, primary key
87+
# b_id :integer not null, primary key
8888
# name :string(50) not null
8989
#
9090
EOS

0 commit comments

Comments
 (0)