Farmbot-Web-App/spec/controllers/dashboarad_failures_spec.rb

14 lines
413 B
Ruby
Raw Normal View History

2018-03-06 07:51:29 -07:00
describe DashboardController do
include Devise::Test::ControllerHelpers
let(:user) { FactoryBot.create(:user, confirmed_at: nil) }
render_views
it 'can not re-verify' do
user.update(confirmed_at: Time.now)
2018-03-06 07:51:29 -07:00
sign_in user
get :confirmation_page, params: { token: user.confirmation_token }
2018-03-06 07:51:29 -07:00
expect(response.status).to eq(409)
expect(response.body).to include("already verified")
end
end