Skip to content

Instantly share code, notes, and snippets.

@BrianJoyce1
Created March 31, 2013 20:23
Show Gist options
  • Save BrianJoyce1/5281883 to your computer and use it in GitHub Desktop.
Save BrianJoyce1/5281883 to your computer and use it in GitHub Desktop.
some test code
require 'spec_helper'
describe User do
# pending "add some examples to (or delete) #{__FILE__}"
it "can login" do
user = FactoryGirl.create(:user)
visit '/login'
uri = URI.parse(current_url)
puts uri
fill_in 'email', :with => user.email
fill_in 'password', :with => user.password
click_button 'Login'
page.should have_content "Signed in successfully"
end
it "displays their email address" do
user = FactoryGirl.create(:user)
visit '/login'
puts "USER EMAIL IS: #{user.email}"
page.should have_content user.email
end
it "takes them to the home page"
it "shows their content"
it "shows the logout button"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment