Sha256: c9230de264470a57bba85389e490d5f7b56d27abee49ddf09ab29a65d9a0fbcc
Contents?: true
Size: 593 Bytes
Versions: 33
Compression:
Stored size: 593 Bytes
Contents
module Ddr::Auth RSpec.describe AbilityFactory do describe ".call" do subject { described_class.call(user, env) } describe "anonymous context" do let(:user) { nil } let(:env) { Hash.new } it { is_expected.to be_a(AnonymousAbility) } end describe "superuser context" do let(:user) { FactoryGirl.create(:user) } let(:env) { Hash.new } before { allow_any_instance_of(AuthContext).to receive(:superuser?) { true } } it { is_expected.to be_a(SuperuserAbility) } end end end end
Version data entries
33 entries across 33 versions & 1 rubygems