Sha256: b6888d7a8a97a478a76d02af891b4a25eab39c7b38d5201c68c27c02cc6d9014

Contents?: true

Size: 733 Bytes

Versions: 34

Compression:

Stored size: 733 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class EmailSignupsIntegrationTest < Workarea::IntegrationTest
      def test_saves_a_sign_up
        post storefront.email_signup_path,
          params: { email: 'bcrouse@workarea.com' }

        assert_redirected_to(storefront.root_path)
        assert(flash[:success].present?)
        assert_equal(1, Email::Signup.where(email: 'bcrouse@workarea.com').count)
      end

      def test_handles_a_sign_up_failure
        post storefront.email_signup_path,
          params: { email: 'bcrouse@workarea' }

        assert_redirected_to(storefront.root_path)
        assert(flash[:error].present?)
        assert_equal(0, Email::Signup.count)
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-storefront-3.4.45 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.44 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.43 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.42 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.41 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.40 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.39 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.38 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.37 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.36 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.35 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.34 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.33 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.32 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.31 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.30 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.29 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.28 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.27 test/integration/workarea/storefront/email_signups_integration_test.rb
workarea-storefront-3.4.26 test/integration/workarea/storefront/email_signups_integration_test.rb