2
我正嘗試通過使用Capybara爲我的應用程序+設計編寫集成測試的簽名。與設計一起使用水豚?
這是我到目前爲止有:
require 'spec_helper'
describe "the signup process", :type => :request do
before :each do
@user_1 = Factory.create(:user, :email => '[email protected]', :password => 'iPassword')
end
it "signs me in" do
visit new_user_session_path
fill_in 'user[email]', :with => '[email protected]'
fill_in 'user[password]', :with => 'iPassword'
click_link_or_button 'Sign In'
end
end
這在流逝。這裏的問題是,它沒有檢查用戶是否登錄(cookie?),並且URL重定向正確?
如何將這些細節添加到此測試中?此外,對於無效登錄,我如何測試以確保閃光警報設置正確?
謝謝
謝謝,我看日誌。出於某種原因,它將重定向到example.com的任何想法? – AnApprentice
你有devise.rb嗎?添加回答。 –
我只是將它添加到:spec/support/devise.rb,它以前不存在。現在嘗試 – AnApprentice