-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6645df
commit c2e7537
Showing
7 changed files
with
48 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>IntroTodos</title> | ||
<%= stylesheet_link_tag "application", :media => "all" %> | ||
<%= javascript_include_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
</head> | ||
<body> | ||
<div data-role="user-identification"> | ||
<%= session[:current_user] %> | ||
</div> | ||
<head> | ||
<title>IntroTodos</title> | ||
<%= stylesheet_link_tag "application", :media => "all" %> | ||
<%= javascript_include_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
</head> | ||
<body> | ||
<% if session[:current_user] %> | ||
<div data-role="user-identification"> | ||
<%= session[:current_user] %> | ||
</div> | ||
<%= link_to "Sign Out", sessions_path, method: :delete %> | ||
<% end %> | ||
<%= yield %> | ||
<%= yield %> | ||
|
||
</body> | ||
</body> | ||
</html> |
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,10 @@ | ||
Feature: Sign out of the application | ||
In order to prevent unauthorized access to my todos | ||
As a user | ||
I should to be able to sign out | ||
|
||
Scenario: | ||
Given I am logged in as "person@example.com" | ||
When I sign out | ||
Then I should be signed out | ||
|
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,15 @@ | ||
Given /^I am logged in as "([^"]*)"$/ do |email_address| | ||
steps %{ | ||
Given I am on the homepage | ||
When I register for an account with the email "#{email_address}" | ||
} | ||
end | ||
|
||
When /^I sign out$/ do | ||
click_link "Sign Out" | ||
end | ||
|
||
Then /^I should be signed out$/ do | ||
page.should_not have_css("[data-role='user-identification']") | ||
page.should_not have_link("Sign out") | ||
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