diff --git a/Gemfile b/Gemfile index abcf5dd87..fbc7e0078 100644 --- a/Gemfile +++ b/Gemfile @@ -96,6 +96,6 @@ group :test do gem 'rspec-instafail', '>= 0.1.7', :require => false gem 'fuubar' - gem 'diaspora-client', #:git => 'git@github.com:diaspora/diaspora-client.git' - :path => "~/workspace/diaspora-client" + gem 'diaspora-client', :git => 'git@github.com:diaspora/diaspora-client.git' + #:path => "~/work/diaspora-client" end diff --git a/Gemfile.lock b/Gemfile.lock index c5dbe5c73..ce4c7fc00 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,14 +38,8 @@ GIT eventmachine (>= 0.12.9) GIT - remote: https://github.com/zhitomirskiyi/ruby-jwt - revision: fa7f46b5ac3653e30cf60abc78de9ffb3319dc0c - specs: - jwt (0.1.3) - json (>= 1.2.4) - -PATH - remote: ~/workspace/diaspora-client + remote: git@github.com:diaspora/diaspora-client.git + revision: 6b1b07fba73106755acd77d6def3e503df007a3f specs: diaspora-client (0.0.0) activerecord @@ -54,6 +48,13 @@ PATH oauth2 sinatra +GIT + remote: https://github.com/zhitomirskiyi/ruby-jwt + revision: fa7f46b5ac3653e30cf60abc78de9ffb3319dc0c + specs: + jwt (0.1.3) + json (>= 1.2.4) + GEM remote: http://rubygems.org/ specs: diff --git a/features/oauth.feature b/features/oauth.feature index 2fc5a33b2..0388b7cc0 100644 --- a/features/oauth.feature +++ b/features/oauth.feature @@ -66,3 +66,14 @@ Feature: oauth And I follow "Revoke Access" Then I visit "/account?id=1" on Chubbies Then I should see "Token invalid" + + Scenario: Re-registering a client if the client recognizes the diaspora pod but the diaspora pod has since been reset + Given Chubbies is registered on my pod + And I remove all traces of Chubbies on the pod + + When I try to authorize Chubbies + + When I press "Authorize" + Then I should be on "/account" on Chubbies + And I should see my "profile.birthday" + And I should see my "name" diff --git a/features/step_definitions/oauth_steps.rb b/features/step_definitions/oauth_steps.rb index f09af5580..a0793eb31 100644 --- a/features/step_definitions/oauth_steps.rb +++ b/features/step_definitions/oauth_steps.rb @@ -26,6 +26,10 @@ And /^there is only one Chubbies$/ do OAuth2::Provider.client_class.where(:name => "Chubbies").count.should == 1 end +And /^I remove all traces of Chubbies on the pod$/ do + OAuth2::Provider.client_class.destroy_all +end + When /^I try to authorize Chubbies$/ do # We need to reset the tokens saved in Chubbies, # as we are clearing the Diaspora DB every scenario diff --git a/spec/chubbies/Gemfile b/spec/chubbies/Gemfile index e756b9bb8..4265b8447 100644 --- a/spec/chubbies/Gemfile +++ b/spec/chubbies/Gemfile @@ -7,5 +7,6 @@ gem 'json' gem 'shotgun' gem 'sqlite3' gem 'activerecord', '3.0.3' -gem 'diaspora-client', :path => "~/workspace/diaspora-client" - #:git => 'git@github.com:diaspora/diaspora-client.git' +gem 'diaspora-client', :git => 'git@github.com:diaspora/diaspora-client.git' + #:path => "~/work/diaspora-client" + diff --git a/spec/chubbies/Gemfile.lock b/spec/chubbies/Gemfile.lock index b9370ee7c..fab831ebc 100644 --- a/spec/chubbies/Gemfile.lock +++ b/spec/chubbies/Gemfile.lock @@ -1,5 +1,6 @@ -PATH - remote: ~/workspace/diaspora-client +GIT + remote: git@github.com:diaspora/diaspora-client.git + revision: 6b1b07fba73106755acd77d6def3e503df007a3f specs: diaspora-client (0.0.0) activerecord