Add api_sign_in method for UserIntegrationHelpers
This commit is contained in:
parent
906851f50f
commit
f8ed140af1
@ -6,4 +6,13 @@ module UserIntegrationHelpers
|
|||||||
fill_in 'Password', :with => user.password
|
fill_in 'Password', :with => user.password
|
||||||
click_button('Sign in')
|
click_button('Sign in')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def api_sign_in
|
||||||
|
user = Factory.create :user
|
||||||
|
|
||||||
|
post api_sessions_path, :format => :json, :session => {
|
||||||
|
:email => user.email,
|
||||||
|
:password => user.password
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user