Skip to content

Commit 46c1fca

Browse files
committed
test: Add column_names test
1 parent 2a3ee89 commit 46c1fca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/active_yaml/aliases_spec.rb

+10
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ class KeyProduct < ActiveYaml::Base
4343
model.all
4444
expect(model.field_names).to match_array [:name, :flavor, :price]
4545
end
46+
47+
it 'excludes them from column_names' do
48+
model.all
49+
expect(model.column_names).to match_array ["name", "flavor", "price"]
50+
end
4651
end
4752
end
4853

@@ -70,6 +75,11 @@ class KeyProduct < ActiveYaml::Base
7075
model.all
7176
expect(model.field_names).to match_array [:name, :flavor, :price, :slogan, :key]
7277
end
78+
79+
it 'excludes them from column_names' do
80+
model.all
81+
expect(model.column_names).to match_array ["name", "flavor", "price", "slogan", "key"]
82+
end
7383
end
7484
end
7585

0 commit comments

Comments
 (0)