Created
July 30, 2016 01:09
-
-
Save kenzotakahashi/9dce8fe5d2d75b3026c1895c1ae89159 to your computer and use it in GitHub Desktop.
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
require 'rails_helper' | |
RSpec.describe "the signin process", :type => :feature do | |
# before :each do | |
# User.new(:email => 'user@example.com', :password => 'password') | |
# end | |
it "signs me in" do | |
visit '/login' | |
within(".row") do | |
fill_in 'session_email', :with => 'kenzotakahashi2@gmail.com' | |
fill_in 'session_password', :with => 'python' | |
end | |
click_button 'Log in' | |
# expect(page).to have_content 'Invalid' | |
expect(page).to have_content 'followers' | |
# expect(page).to have_content 'kenzotakahashi2@gmail.com' | |
end | |
it "does not sign me in" do | |
visit '/login' | |
within(".row") do | |
fill_in 'session[email]', :with => 'kenzotakahashi2@gmail.com' | |
fill_in 'session[password]', :with => '' | |
end | |
click_button 'Log in' | |
expect(page).to have_content 'Invalid' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment