Skip to content

Commit

Permalink
Update Postgres schema spec tests for JSON type and table count
Browse files Browse the repository at this point in the history
- Validate `preferences` field as `JSON::Any` in user preferences test
- Adjust expected table count from 2 to 3 in schema creation test
  • Loading branch information
eliasjpr committed Sep 14, 2024
1 parent 936d68e commit 4deba34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/adapters/postgres_schema_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe Cql::Schema do
.values(preferences: %({"theme": "dark"}))
.commit
result = Example.query.from(:user_pref).limit(1).first!(UserPref)
puts result
result.preferences.should be_a(JSON::Any)
end
end

Expand Down Expand Up @@ -61,7 +61,7 @@ describe Cql::Schema do
end

it "creates a schema" do
Example.tables.size.should eq(2)
Example.tables.size.should eq(3)
Example.tables[:customers].columns.size.should eq(4)
end

Expand Down

0 comments on commit 4deba34

Please sign in to comment.