Sha256: 382ab00fd5dd116e53c4e674818ff3a55a9b3fa3facffacf01c9f239c2191b6e

Contents?: true

Size: 971 Bytes

Versions: 62

Compression:

Stored size: 971 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class PublishingIntegrationTest < Workarea::IntegrationTest
      include Admin::IntegrationTest

      def test_publishing
        product = create_product(name: 'Foo')
        release = create_release

        patch admin.catalog_product_path(product),
          params: {
            publishing: release.id,
            product: { name: 'Bar' }
          }

        assert_nil(Release.current)
        assert_equal(release.id, session[:release_id])
        assert_equal('Foo', product.reload.name)
        assert_equal(1, product.changesets.length)

        patch admin.catalog_product_path(product),
          params: {
            publishing: 'now',
            product: { name: 'Baz' }
          }

        assert_nil(Release.current)
        assert(session[:release_id].blank?)
        assert_equal('Baz', product.reload.name)
        assert_equal(1, product.changesets.length)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.26 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.45 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.25 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.23 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.44 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.22 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.43 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.21 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.42 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.20 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.41 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.19 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.40 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.18 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.39 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.17 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.38 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.5.16 test/integration/workarea/admin/publishing_integration_test.rb
workarea-admin-3.4.37 test/integration/workarea/admin/publishing_integration_test.rb