@@ -20,6 +20,7 @@ def create_user
20
20
create_visitor
21
21
delete_user
22
22
@user = FactoryGirl . create ( :user , email : @visitor [ :email ] )
23
+ @user . add_role ( "" )
23
24
end
24
25
25
26
def delete_user
@@ -47,7 +48,7 @@ def sign_in
47
48
48
49
### GIVEN ###
49
50
Given /^I am not logged in$/ do
50
- visit '/users/sign_out'
51
+ visit destroy_user_session_path
51
52
end
52
53
53
54
Given /^I am logged in$/ do
@@ -128,10 +129,6 @@ def sign_in
128
129
click_button "Update"
129
130
end
130
131
131
- When /^I look at the list of users$/ do
132
- visit '/'
133
- end
134
-
135
132
### THEN ###
136
133
Then /^I should be signed in$/ do
137
134
page . should have_content "Logout"
@@ -140,7 +137,6 @@ def sign_in
140
137
end
141
138
142
139
Then /^I should be signed out$/ do
143
- page . should have_content "Sign up"
144
140
page . should have_content "Login"
145
141
page . should_not have_content "Logout"
146
142
end
@@ -158,19 +154,19 @@ def sign_in
158
154
end
159
155
160
156
Then /^I should see an invalid email message$/ do
161
- page . should have_content "Email is invalid"
157
+ page . should have_content "is invalid"
162
158
end
163
159
164
160
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"
166
162
end
167
163
168
164
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"
170
166
end
171
167
172
168
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"
174
170
end
175
171
176
172
Then /^I should see a signed out message$/ do
0 commit comments