scube-server/spec/integration/user_sign_in_spec.rb
2014-04-01 05:04:27 +00:00

21 lines
445 B
Ruby

require 'spec_helper'
feature 'User sign in' do
scenario 'redirects to the home page when not signed in' do
visit root_path
current_path.should == new_session_path
end
scenario 'signs the user in' do
user = FactoryGirl.create(:user)
visit new_session_path
fill_in 'Email', :with => user.email
fill_in 'Password', :with => user.password
click_button 'Sign in'
current_path.should == root_path
end
end