gds-sso 10.0.0 → 10.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c2a82df598dc943462bc7fbcca8e7b593a2adeb
4
- data.tar.gz: 80930f0d3f00dee61a9581ad1900033af5b0c9ee
3
+ metadata.gz: b59b24d8100c951ab54687d34e02143d0b0aa955
4
+ data.tar.gz: 58773dd9a1adc0096e9e30ae2bb661a69a5e3180
5
5
  SHA512:
6
- metadata.gz: fee80045f2b3e5267492e6e9c5a083e4008b03768ad3f9e548476184287d470b9988f2b222eeeceeb8ecaf254a4f75de6db3e1d7e39c996e703ff68f7bc27050
7
- data.tar.gz: d90b8227cad43d48f0d85c2315f584a8dc9f560fa9adeb4483f445a6c92b04a62e34ebed1dde8ac498d936469b883f6742ed72414883f233d4dc2c58ac6dd8c6
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
- expect(subject).to respond_to(:update_attributes)
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'])
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "10.0.0"
3
+ VERSION = "10.0.1"
4
4
  end
5
5
  end
@@ -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 `permissions`;
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 `permissions` (user_id, application_id, permissions) VALUES (1,1,"---
18
- - signin
19
- ");
20
- INSERT INTO `permissions` (user_id, application_id, permissions) VALUES (1,2,"---
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');