1
我有功能規格測試:Rspec的:click_link在電子郵件正文
describe "Reset password" do
let(:last_email) { ActionMailer::Base.deliveries.last }
it "should be success" do
# ...
page.should have_content t("users.passwords.sent")
last_email.to.first.should eq user.email
last_email.body.should have_content t("mail.body.recovery_instructions")
# Here is click_link
page.should have_content t("passwords.updated")
end
end
我如何可以點擊鏈接,位於last_email.body
?
謝謝,我添加鏈接標題模式及其作品如預期而已。 – ole