test/integration/lockable_test.rb in devise-1.1.rc0 vs test/integration/lockable_test.rb in devise-1.1.rc1

- old
+ new

@@ -35,12 +35,20 @@ assert_contain 'not locked' assert_equal 0, ActionMailer::Base.deliveries.size end test 'unlocked pages should not be available if email strategy is disabled' do - visit new_user_unlock_path + visit "/users/sign_in" + click_link "Didn't receive unlock instructions?" + swap Devise, :unlock_strategy => :time do + visit "/users/sign_in" + + assert_raise Webrat::NotFoundError do + click_link "Didn't receive unlock instructions?" + end + assert_raise AbstractController::ActionNotFound do visit new_user_unlock_path end end end @@ -48,10 +56,10 @@ test 'user with invalid unlock token should not be able to unlock an account' do visit_user_unlock_with_token('invalid_token') assert_response :success assert_template 'unlocks/new' - assert_have_selector '#errorExplanation' + assert_have_selector '#error_explanation' assert_contain /Unlock token(.*)invalid/ end test "locked user should be able to unlock account" do user = create_user(:locked => true)