rom-sql 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile +1 -0
- data/lib/rom/sql/attribute.rb +1 -1
- data/lib/rom/sql/projection_dsl.rb +6 -0
- data/lib/rom/sql/version.rb +1 -1
- data/rom-sql.gemspec +1 -1
- data/spec/integration/association/many_to_many/custom_fks_spec.rb +9 -13
- data/spec/integration/association/many_to_many/from_view_spec.rb +9 -8
- data/spec/integration/association/many_to_many_spec.rb +103 -102
- data/spec/integration/association/many_to_one/custom_fks_spec.rb +6 -7
- data/spec/integration/association/many_to_one/from_view_spec.rb +8 -4
- data/spec/integration/association/many_to_one_spec.rb +61 -54
- data/spec/integration/association/one_to_many/custom_fks_spec.rb +7 -6
- data/spec/integration/association/one_to_many/from_view_spec.rb +7 -10
- data/spec/integration/association/one_to_many/self_ref_spec.rb +6 -6
- data/spec/integration/association/one_to_many_spec.rb +0 -3
- data/spec/integration/association/one_to_one_spec.rb +17 -11
- data/spec/integration/association/one_to_one_through_spec.rb +3 -5
- data/spec/integration/commands/create_spec.rb +33 -22
- data/spec/integration/commands/update_spec.rb +3 -3
- data/spec/integration/commands/upsert_spec.rb +1 -1
- data/spec/integration/gateway_spec.rb +12 -8
- data/spec/integration/migration_spec.rb +4 -3
- data/spec/integration/plugins/associates/many_to_many_spec.rb +2 -2
- data/spec/integration/plugins/associates_spec.rb +1 -1
- data/spec/integration/relation_schema_spec.rb +4 -5
- data/spec/integration/schema/call_spec.rb +1 -1
- data/spec/integration/schema/inferrer/mysql_spec.rb +22 -23
- data/spec/integration/schema/inferrer/postgres_spec.rb +83 -82
- data/spec/integration/schema/inferrer/sqlite_spec.rb +18 -19
- data/spec/integration/schema/inferrer_spec.rb +54 -33
- data/spec/integration/schema/prefix_spec.rb +9 -11
- data/spec/integration/schema/qualified_spec.rb +9 -11
- data/spec/integration/schema/rename_spec.rb +13 -15
- data/spec/integration/schema/view_spec.rb +2 -2
- data/spec/integration/sequel_api_spec.rb +1 -1
- data/spec/integration/setup_spec.rb +5 -5
- data/spec/integration/support/active_support_notifications_spec.rb +2 -2
- data/spec/integration/support/rails_log_subscriber_spec.rb +2 -2
- data/spec/shared/accounts.rb +44 -0
- data/spec/shared/database_setup.rb +42 -81
- data/spec/shared/notes.rb +21 -0
- data/spec/shared/posts.rb +32 -0
- data/spec/shared/puppies.rb +13 -0
- data/spec/shared/relations.rb +1 -1
- data/spec/shared/users.rb +29 -0
- data/spec/shared/users_and_tasks.rb +32 -18
- data/spec/spec_helper.rb +18 -30
- data/spec/support/env_helper.rb +25 -0
- data/spec/support/oracle/create_users.sql +7 -0
- data/spec/support/oracle/set_sys_passwords.sql +2 -0
- data/spec/unit/plugin/pagination_spec.rb +2 -2
- data/spec/unit/plugin/timestamp_spec.rb +1 -1
- data/spec/unit/projection_dsl_spec.rb +8 -0
- data/spec/unit/relation/group_spec.rb +5 -3
- data/spec/unit/relation/max_spec.rb +1 -1
- data/spec/unit/relation/select_spec.rb +7 -0
- metadata +33 -5
- data/spec/shared/users_and_accounts.rb +0 -10
@@ -1,10 +0,0 @@
|
|
1
|
-
shared_context 'users and accounts' do
|
2
|
-
include_context 'database setup'
|
3
|
-
|
4
|
-
before do
|
5
|
-
conn[:users].insert id: 1, name: 'Piotr'
|
6
|
-
conn[:accounts].insert id: 1, user_id: 1, number: '42', balance: 10_000.to_d
|
7
|
-
conn[:cards].insert id: 1, account_id: 1, pan: '*6789'
|
8
|
-
conn[:subscriptions].insert id: 1, card_id: 1, service: 'aws'
|
9
|
-
end
|
10
|
-
end
|