Sha256: dea60ebd5531e082f7fa5263717e3f9dac19ee63ec7bf6327c2128d5cece5d8f
Contents?: true
Size: 890 Bytes
Versions: 10
Compression:
Stored size: 890 Bytes
Contents
require 'test_helper' class UnsubscribeTest < ActionDispatch::IntegrationTest setup do ApplicationController.any_instance.stubs(:current_user).returns(nil) ApplicationController.any_instance.stubs(:authenticate_user).returns(false) end test "should be able to unsubscribe from blog" do subscription = FactoryGirl.create(:subscription) visit proclaim.unsubscribe_path(subscription.token) assert_difference('Proclaim::Subscription.count', -1) do click_link "unsubscribe" end assert_equal proclaim.unsubscribed_path, current_path end test "should be able to unsubscribe from post" do subscription = FactoryGirl.create(:published_post_subscription) visit proclaim.unsubscribe_path(subscription.token) assert_difference('Proclaim::Subscription.count', -1) do click_link "unsubscribe" end assert_equal proclaim.unsubscribed_path, current_path end end
Version data entries
10 entries across 10 versions & 1 rubygems