added cucumber test for re-registering a pod from a client
This commit is contained in:
parent
63125cb9b9
commit
bd84eaaf75
6 changed files with 32 additions and 14 deletions
4
Gemfile
4
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
|
||||
|
|
|
|||
17
Gemfile.lock
17
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:
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue