Sha256: 17d9127cf6d526a1cf4391517ce66562f6558ff94222ef5fe94a8286d64bf344

Contents?: true

Size: 484 Bytes

Versions: 5

Compression:

Stored size: 484 Bytes

Contents

require 'rails_helper'
require "curupira/authorizer"

describe Curupira::Authorizer do
  include Curupira::Authorizer
  
  describe "#has_authorization?" do
    let!(:current_user) { FactoryGirl.create(:user) }
    let(:params) do
      {
        controller: "users",
        action: "create"
      }
    end

    before do
      setup_authorization(current_user, "users", "manage")
    end

    it "have authorization" do
      expect(has_authorization?).to be true
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
curupira-0.1.7 spec/curupira/full_feature_spec.rb
curupira-0.1.6 spec/curupira/full_feature_spec.rb
curupira-0.1.4 spec/curupira/full_feature_spec.rb
curupira-0.1.3 spec/curupira/full_feature_spec.rb
curupira-0.1.2 spec/curupira/full_feature_spec.rb