WIP prefilling username on logout of user is almost there
This commit is contained in:
parent
a63d1ad4ae
commit
89edfb7ed6
4 changed files with 11 additions and 2 deletions
3
Gemfile
3
Gemfile
|
|
@ -119,6 +119,7 @@ group :test do
|
|||
gem 'rspec-instafail', '>= 0.1.7', :require => false
|
||||
gem 'fuubar'
|
||||
|
||||
gem 'diaspora-client', :path => '~/workspace/diaspora-client' #:git => 'git://github.com/diaspora/diaspora-client.git'
|
||||
gem 'diaspora-client', :path => '~/workspace/diaspora-client'
|
||||
#:git => 'git://github.com/diaspora/diaspora-client.git'
|
||||
|
||||
end
|
||||
|
|
|
|||
6
app/helpers/sessions_helper.rb
Normal file
6
app/helpers/sessions_helper.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module SessionsHelper
|
||||
def prefilled_username
|
||||
uri = Addressable::URI.parse(session["user_return_to"])
|
||||
uri ? uri.query_values["uid"] : nil
|
||||
end
|
||||
end
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
%p
|
||||
= f.label :username , t('username')
|
||||
= f.text_field :username, :tabindex => 1
|
||||
= f.text_field :username, :tabindex => 1 , :value => prefilled_username
|
||||
%br
|
||||
|
||||
%p
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ Feature: oauth
|
|||
And I fill in "Diaspora ID" with "bob@localhost:9887"
|
||||
And I press "Connect to Diaspora"
|
||||
Then I should be on the new user session page
|
||||
And I debug
|
||||
And I should see "bob" within "#user_username"
|
||||
|
||||
Scenario: Not authorize Chubbies
|
||||
When I try to authorize Chubbies
|
||||
|
|
|
|||
Loading…
Reference in a new issue