describe "create post", :js => true do
before :each do
a = User.create!(:email => 'any@gmail.com', :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 => 'any@gmail.com'
fill_in 'Password', :with => 'admin123'
end
click_button 'Sign in'
save_and_open_page
end
end
rake spec:requests で実行すると
ログインできません。ブラウザに無効な電子メールまたはパスワードのエラーが表示されます。何をすべきか教えてください。