Sha256: 37a36a9a46a5ee435a7d1d00e5d9c2460132e824c3cef9750a99974389f44f11

Contents?: true

Size: 856 Bytes

Versions: 28

Compression:

Stored size: 856 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class UnsubscribesIntegrationTest < Workarea::IntegrationTest
      def test_unsubscribing_from_status_report
        user = create_user(status_email_recipient: true)

        get admin.status_report_unsubscribe_path(user.token)

        assert_redirected_to(storefront.root_path)
        assert(flash[:success].present?)

        user.reload
        refute(user.status_email_recipient)
      end

      def test_unsubscribing_from_commentable
        user = create_user(admin: true)
        commentable = create_release(subscribed_user_ids: [user.id])

        get admin.commentable_unsubscribe_url(
          user.token,
          commentable_id: commentable.to_global_id
        )

        commentable.reload
        assert_equal([], commentable.subscribed_user_ids)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.26 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.25 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.23 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.22 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.21 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.20 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.19 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.18 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.17 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.16 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.15 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.14 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.13 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.12 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.11 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.10 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.9 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.8 test/integration/workarea/admin/unsubscribes_integration_test.rb
workarea-admin-3.5.7 test/integration/workarea/admin/unsubscribes_integration_test.rb