Sha256: 08f45ace17277b620f57dee1492d61b3534cdf3ab3dbc55d3cfe4e3293f1f1b3

Contents?: true

Size: 298 Bytes

Versions: 7

Compression:

Stored size: 298 Bytes

Contents

module TestHelpers
  module AuthenticationHelper
    def give_permission(*resources)
      if !@user
        raise "User must be set to build permissions"
      end

      resources.each do |resource|
        @user.permissions << create(:permission, resource: resource)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
outpost-cms-0.1.4 spec/support/authorization_helper.rb
outpost-cms-0.1.3 spec/support/authorization_helper.rb
outpost-cms-0.1.2 spec/support/authorization_helper.rb
outpost-cms-0.1.1 spec/support/authorization_helper.rb
outpost-cms-0.1.0 spec/support/authorization_helper.rb
outpost-cms-0.0.5 spec/support/authorization_helper.rb
outpost-cms-0.0.4 spec/support/authorization_helper.rb