Sha256: 71cf5b09551ef440d7932d83f1ae208506d20657c9ade31bd6656f135c579c26

Contents?: true

Size: 626 Bytes

Versions: 62

Compression:

Stored size: 626 Bytes

Contents

require 'test_helper'

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

      setup :set_user

      def set_user
        @user = create_user(admin: true)
        set_current_user(@user)
      end

      def test_redirects_if_you_do_not_have_permissions
        get admin.catalog_products_path
        assert(response.redirect?)
      end

      def test_allows_if_you_do_have_permissions
        @user.update_attributes!(catalog_access: true)
        get admin.catalog_products_path
        assert(response.ok?)
      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/permissions_integration_test.rb
workarea-admin-3.5.26 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.45 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.25 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.23 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.44 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.22 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.43 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.21 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.42 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.20 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.41 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.19 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.40 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.18 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.39 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.17 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.38 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.5.16 test/integration/workarea/admin/permissions_integration_test.rb
workarea-admin-3.4.37 test/integration/workarea/admin/permissions_integration_test.rb