Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
game edition actions are login protected
- Loading branch information
Showing
6 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
Feature: Game feature | ||
|
||
Scenario: Create game requires login | ||
Given I am not authenticated | ||
When I visit the new game page | ||
Then I should be requested to login | ||
|
||
Scenario: Create game with existing users | ||
Given I am a new, authenticated user | ||
When I create a game | ||
Then I should see the game | ||
And the players should receive a game email | ||
|
||
Scenario: Create game using emails | ||
Given I am a new, authenticated user | ||
When I create a game using emails | ||
Then I should see the game | ||
And the players should receive a game email | ||
|
||
Scenario: Create double with existing users | ||
Given I am a new, authenticated user | ||
When I create a double | ||
Then I should see the game | ||
And the players should receive a double email | ||
|
||
Scenario: Create double using emails | ||
Given I am a new, authenticated user | ||
When I create a double using emails | ||
Then I should see the game | ||
And the players should receive a double email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Given /^I am not authenticated$/ do | ||
# nothing I am not authenticated | ||
#visit('/users/sign_out') # ensure that at least | ||
end | ||
|
||
Given /^I am a new, authenticated user$/ do | ||
email = 'testing@man.net' | ||
password = 'secretpass' | ||
User.make!(:email => email, :password => password, :password_confirmation => password) | ||
|
||
visit '/users/sign_in' | ||
fill_in "user_email", :with => email | ||
fill_in "user_password", :with => password | ||
click_button "Sign in" | ||
end | ||
|
||
Then /^I should be requested to login$/ do | ||
assert_equal current_url, new_user_session_url | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters