openstax_accounts 7.11.0 → 7.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/handlers/openstax/accounts/sessions_callback.rb +1 -0
- data/app/representers/openstax/accounts/api/v1/account_representer.rb +6 -0
- data/app/representers/openstax/accounts/api/v1/unclaimed_account_representer.rb +6 -0
- data/app/routines/openstax/accounts/dev/create_account.rb +1 -0
- data/app/routines/openstax/accounts/find_or_create_account.rb +2 -0
- data/app/routines/openstax/accounts/sync_accounts.rb +2 -2
- data/db/migrate/12_add_is_test_to_accounts_accounts.rb +5 -0
- data/lib/openstax/accounts/version.rb +1 -1
- data/spec/dummy/db/schema.rb +1 -0
- data/spec/dummy/log/development.log +192 -0
- data/spec/dummy/log/test.log +19490 -0
- data/spec/factories/openstax_accounts_account.rb +1 -0
- data/spec/routines/openstax/accounts/sync_accounts_spec.rb +12 -9
- metadata +3 -2
@@ -20,9 +20,10 @@ module OpenStax
|
|
20
20
|
user: {
|
21
21
|
id: 2,
|
22
22
|
username: 'user',
|
23
|
+
self_reported_role: 'instructor',
|
23
24
|
uuid: uuid_1,
|
24
25
|
support_identifier: support_identifier_1,
|
25
|
-
|
26
|
+
is_test: true
|
26
27
|
},
|
27
28
|
unread_updates: 1,
|
28
29
|
default_contact_info_id: 1
|
@@ -32,9 +33,9 @@ module OpenStax
|
|
32
33
|
application_id: 1,
|
33
34
|
user: {
|
34
35
|
id: 4,
|
36
|
+
username: 'fuego',
|
35
37
|
uuid: uuid_2,
|
36
|
-
support_identifier: support_identifier_2
|
37
|
-
username: 'fuego'
|
38
|
+
support_identifier: support_identifier_2
|
38
39
|
},
|
39
40
|
unread_updates: 2,
|
40
41
|
default_contact_info_id: 5
|
@@ -57,16 +58,18 @@ module OpenStax
|
|
57
58
|
|
58
59
|
expect { SyncAccounts.call }.to change { Account.count }.by(1)
|
59
60
|
|
60
|
-
|
61
|
+
account_2 = Account.find_by(openstax_uid: 4)
|
61
62
|
|
62
63
|
expect(account.reload.openstax_uid).to eq 2
|
63
64
|
expect(account.username).to eq 'user'
|
64
65
|
expect(account.role).to eq 'instructor'
|
65
66
|
expect(account.uuid).to eq uuid_1
|
66
67
|
expect(account.support_identifier).to eq support_identifier_1
|
67
|
-
expect(
|
68
|
-
expect(
|
69
|
-
expect(
|
68
|
+
expect(account.is_test).to eq true
|
69
|
+
expect(account_2.username).to eq 'fuego'
|
70
|
+
expect(account_2.uuid).to eq uuid_2
|
71
|
+
expect(account_2.support_identifier).to eq support_identifier_2
|
72
|
+
expect(account_2.is_test).to be_nil
|
70
73
|
|
71
74
|
expect(controller_class.last_action).to eq :updated
|
72
75
|
expect(controller_class.last_json).to eq [
|
@@ -80,8 +83,8 @@ module OpenStax
|
|
80
83
|
|
81
84
|
expect(account.reload.openstax_uid).to eq 2
|
82
85
|
expect(account.username).to eq 'user'
|
83
|
-
expect(
|
84
|
-
expect(
|
86
|
+
expect(account_2.reload.openstax_uid).to eq 4
|
87
|
+
expect(account_2.username).to eq 'fuego'
|
85
88
|
|
86
89
|
expect(controller_class.last_action).to eq :updated
|
87
90
|
expect(controller_class.last_json).to eq [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_accounts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -370,6 +370,7 @@ files:
|
|
370
370
|
- db/migrate/0_create_openstax_accounts_accounts.rb
|
371
371
|
- db/migrate/10_assign_missing_uuids_for_local_accounts.rb
|
372
372
|
- db/migrate/11_add_support_identifier_to_accounts_accounts.rb
|
373
|
+
- db/migrate/12_add_is_test_to_accounts_accounts.rb
|
373
374
|
- db/migrate/1_create_openstax_accounts_groups.rb
|
374
375
|
- db/migrate/2_create_openstax_accounts_group_members.rb
|
375
376
|
- db/migrate/3_create_openstax_accounts_group_owners.rb
|