WIP prefilling username on logout of user is almost there

This commit is contained in:
Raphael Sofaer 2011-08-15 18:59:16 -07:00 committed by Maxwell Salzberg
parent a63d1ad4ae
commit 89edfb7ed6
4 changed files with 11 additions and 2 deletions

View file

@ -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

View 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

View file

@ -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

View file

@ -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