Beginning of user invitation acceptance feature
This commit is contained in:
parent
03a5514400
commit
c09c060ebb
3 changed files with 19 additions and 0 deletions
13
features/accepts_invitation.feature
Normal file
13
features/accepts_invitation.feature
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@javascript
|
||||
Feature: invitation acceptance
|
||||
Scenario: accept invitation
|
||||
Given I have been invited by an admin
|
||||
And I am on my acceptance form page
|
||||
And I fill in "Username" with "ohai"
|
||||
And I fill in "user_password" with "secret"
|
||||
And I fill in "Password confirmation" with "secret"
|
||||
And I press "Sign up"
|
||||
Then I should be on the getting started page
|
||||
And I should see "Welcome to Diaspora!"
|
||||
And I should see "ohai"
|
||||
|
||||
|
|
@ -3,6 +3,10 @@ Given /^a user with username "([^\"]*)" and password "([^\"]*)"$/ do |username,
|
|||
:password_confirmation => password, :getting_started => false)
|
||||
end
|
||||
|
||||
Given /^I have been invited by an admin$/ do
|
||||
@me = Invitation.create_invitee(:email => "new_invitee@example.com")
|
||||
end
|
||||
|
||||
When /^I click on my name$/ do
|
||||
click_link("#{@me.first_name} #{@me.last_name}")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ module NavigationHelpers
|
|||
send("#{$1.gsub(/\W+/, '_')}_path")
|
||||
when /^my edit profile page$/
|
||||
edit_person_path(@me.person)
|
||||
when /^my acceptance form page$/
|
||||
accept_user_invitation_path(:invitation_token => @me.invitation_token)
|
||||
when /^the requestor's profile page$/
|
||||
person_path(@me.reload.pending_requests.first.from)
|
||||
when /^"(\/.*)"/
|
||||
|
|
|
|||
Loading…
Reference in a new issue