openstax_accounts 7.5.0 → 7.6.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/dev/accounts_create.rb +4 -3
- data/app/representers/openstax/accounts/api/v1/unclaimed_account_representer.rb +7 -0
- data/app/routines/openstax/accounts/dev/create_account.rb +2 -0
- data/app/routines/openstax/accounts/find_or_create_account.rb +4 -0
- data/app/views/openstax/accounts/dev/accounts/index.html.erb +3 -2
- data/lib/openstax/accounts/version.rb +1 -1
- data/spec/cassettes/OpenStax_Accounts_FindOrCreateAccount/can_create_users.yml +88 -64
- data/spec/dummy/log/test.log +3770 -0
- data/spec/routines/openstax/accounts/find_or_create_account_spec.rb +3 -1
- metadata +2 -2
@@ -15,8 +15,10 @@ module OpenStax
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'can create users' do
|
18
|
-
account_1 = FindOrCreateAccount.call(email: 'alice@example.com').outputs.account
|
18
|
+
account_1 = FindOrCreateAccount.call(email: 'alice@example.com', role: 'instructor').outputs.account
|
19
19
|
expect(account_1).to be_persisted
|
20
|
+
expect(account_1.uuid).to match(/\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i)
|
21
|
+
expect(account_1.role).to eq 'instructor'
|
20
22
|
|
21
23
|
account_2 = FindOrCreateAccount.call(username: 'alice').outputs.account
|
22
24
|
expect(account_2).to be_persisted
|
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.6.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-
|
11
|
+
date: 2017-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|