2
describe "create post", :js => true do
  before :each do
  a = User.create!(:email => '[email protected]', :password => 'admin123', :password_confirmation => 'admin123', :firstname => "black")
  a.confirm!
end

it "signs me in" do

  get root_path
  visit '/'
   within(".form-inline") do
     fill_in 'Email', :with => '[email protected]'
     fill_in 'Password', :with => 'admin123'        
   end
   click_button 'Sign in'

    save_and_open_page
  end
 end

when i execute with rake spec:requests

i'm unable to login, i'm getting invalid email or password error in browser. please tell me what to do?

1
  • Does it work with credentials of existing users, not newly created one? Dec 14, 2012 at 22:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.