Skip to content

Commit f1595cb

Browse files
committed
Merge pull request #2 from tmock12/add_tests
Make cucumber tests pass
2 parents b620ada + 66c3d74 commit f1595cb

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

features/step_definitions/user_steps.rb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def create_user
2020
create_visitor
2121
delete_user
2222
@user = FactoryGirl.create(:user, email: @visitor[:email])
23+
@user.add_role("")
2324
end
2425

2526
def delete_user
@@ -47,7 +48,7 @@ def sign_in
4748

4849
### GIVEN ###
4950
Given /^I am not logged in$/ do
50-
visit '/users/sign_out'
51+
visit destroy_user_session_path
5152
end
5253

5354
Given /^I am logged in$/ do
@@ -128,10 +129,6 @@ def sign_in
128129
click_button "Update"
129130
end
130131

131-
When /^I look at the list of users$/ do
132-
visit '/'
133-
end
134-
135132
### THEN ###
136133
Then /^I should be signed in$/ do
137134
page.should have_content "Logout"
@@ -140,7 +137,6 @@ def sign_in
140137
end
141138

142139
Then /^I should be signed out$/ do
143-
page.should have_content "Sign up"
144140
page.should have_content "Login"
145141
page.should_not have_content "Logout"
146142
end
@@ -158,19 +154,19 @@ def sign_in
158154
end
159155

160156
Then /^I should see an invalid email message$/ do
161-
page.should have_content "Email is invalid"
157+
page.should have_content "is invalid"
162158
end
163159

164160
Then /^I should see a missing password message$/ do
165-
page.should have_content "Password can't be blank"
161+
page.should have_content "can't be blank"
166162
end
167163

168164
Then /^I should see a missing password confirmation message$/ do
169-
page.should have_content "Password doesn't match confirmation"
165+
page.should have_content "doesn't match confirmation"
170166
end
171167

172168
Then /^I should see a mismatched password message$/ do
173-
page.should have_content "Password doesn't match confirmation"
169+
page.should have_content "doesn't match confirmation"
174170
end
175171

176172
Then /^I should see a signed out message$/ do

features/users/user_show.feature

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)