gds-sso 10.0.0 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gds-sso/lint/user_spec.rb +4 -2
- data/lib/gds-sso/version.rb +1 -1
- data/spec/fixtures/integration/signonotron2.sql +11 -8
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/log/test.log +1415 -1414
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b59b24d8100c951ab54687d34e02143d0b0aa955
|
4
|
+
data.tar.gz: 58773dd9a1adc0096e9e30ae2bb661a69a5e3180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0449983028cc0664a54558962080904cecfb954823ad56a034b6449ddc8ee722e124f77bc19d6e394fc9244977fdc9887937e9ce13c81518b41e24c0272388b3
|
7
|
+
data.tar.gz: 38cb91f5160bacb022d665e275fd944085cbce028bc0659221ecfb14a5e7bbffa4636a16eff9546de290adca70181cf2db0a0e5a38ad50794ba7662c34682a05
|
@@ -1,5 +1,5 @@
|
|
1
1
|
RSpec.shared_examples "a gds-sso user class" do
|
2
|
-
subject { described_class.new }
|
2
|
+
subject { described_class.new(:uid => '12345') }
|
3
3
|
|
4
4
|
it "implements #where" do
|
5
5
|
expect(described_class).to respond_to(:where)
|
@@ -16,7 +16,8 @@ RSpec.shared_examples "a gds-sso user class" do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "implements #update_attributes" do
|
19
|
-
|
19
|
+
subject.update_attributes(email: "ab@c.com")
|
20
|
+
expect(subject.email).to eq("ab@c.com")
|
20
21
|
end
|
21
22
|
|
22
23
|
it "implements #create!" do
|
@@ -44,6 +45,7 @@ RSpec.shared_examples "a gds-sso user class" do
|
|
44
45
|
|
45
46
|
user = described_class.find_for_gds_oauth(auth_hash)
|
46
47
|
expect(user).to be_an_instance_of(described_class)
|
48
|
+
expect(user.uid).to eq('12345')
|
47
49
|
expect(user.name).to eq("Joe Smith")
|
48
50
|
expect(user.email).to eq('joe.smith@example.com')
|
49
51
|
expect(user.permissions).to eq(['signin'])
|
data/lib/gds-sso/version.rb
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
DELETE FROM `oauth_access_grants`;
|
3
3
|
DELETE FROM `oauth_access_tokens`;
|
4
4
|
DELETE FROM `oauth_applications`;
|
5
|
-
DELETE FROM `
|
5
|
+
DELETE FROM `supported_permissions`;
|
6
6
|
DELETE FROM `users`;
|
7
|
+
DELETE FROM `user_application_permissions`;
|
7
8
|
|
8
9
|
-- Setup fixture data
|
9
10
|
INSERT INTO `oauth_applications` (id, name, uid, secret, redirect_uri, created_at, updated_at, home_uri, description)
|
@@ -11,13 +12,15 @@ INSERT INTO `oauth_applications` (id, name, uid, secret, redirect_uri, created_a
|
|
11
12
|
INSERT INTO `oauth_applications` (id, name, uid, secret, redirect_uri, created_at, updated_at, home_uri, description)
|
12
13
|
VALUES (2,'A different appilcation','application-2','different secret','http://www.example-client2.com/auth/gds/callback','2014-07-14-09:07:32','2014-07-14-09:07:32', 'http://www.example-client2.com', '');
|
13
14
|
|
15
|
+
INSERT INTO `supported_permissions` (id, application_id, name, created_at, updated_at)
|
16
|
+
VALUES (1,1,'signin','2012-04-19 13:26:54','2012-04-19 13:26:54');
|
17
|
+
INSERT INTO `supported_permissions` (id, application_id, name, created_at, updated_at)
|
18
|
+
VALUES (2,2,'signin','2012-04-19 13:26:54','2012-04-19 13:26:54');
|
19
|
+
|
14
20
|
INSERT INTO `users` (id, email, encrypted_password, password_salt, created_at, updated_at, confirmed_at, name, uid, role)
|
15
21
|
VALUES (1,'test@example-client.com','bb8e19edbaa1e7721abe0faa5c1663a7685950093b8c7eceb0f2e3889bdea4c5f17ca97820b2c663edf46ea532d1a9baa04b680fc537b4de8a3f376dd28e3ffd','MpLsZ8q1UaAojTa6bTC6','2012-04-19 13:26:54','2012-04-19 13:26:54','2012-04-19 13:26:54','Test User','integration-uid', "normal");
|
16
22
|
|
17
|
-
INSERT INTO `
|
18
|
-
-
|
19
|
-
|
20
|
-
|
21
|
-
- signin
|
22
|
-
");
|
23
|
-
|
23
|
+
INSERT INTO `user_application_permissions` (user_id, application_id, supported_permission_id, created_at, updated_at)
|
24
|
+
VALUES (1,1,1,'2012-04-19 13:26:54','2012-04-19 13:26:54');
|
25
|
+
INSERT INTO `user_application_permissions` (user_id, application_id, supported_permission_id, created_at, updated_at)
|
26
|
+
VALUES (1,2,2,'2012-04-19 13:26:54','2012-04-19 13:26:54');
|
Binary file
|