Sha256: 0dab044980fb3cb7813f477e26bcaa8cd9bd9b24a72ebf8385cc429ba44a29dd
Contents?: true
Size: 852 Bytes
Versions: 32
Compression:
Stored size: 852 Bytes
Contents
require 'spec_helper' describe Spree::PermissionSets::PromotionManagement do let(:ability) { DummyAbility.new } subject { ability } context "when activated" do before do described_class.new(ability).activate! end it { is_expected.to be_able_to(:manage, Spree::Promotion) } it { is_expected.to be_able_to(:manage, Spree::PromotionRule) } it { is_expected.to be_able_to(:manage, Spree::PromotionAction) } it { is_expected.to be_able_to(:manage, Spree::PromotionCategory) } end context "when not activated" do it { is_expected.not_to be_able_to(:manage, Spree::Promotion) } it { is_expected.not_to be_able_to(:manage, Spree::PromotionRule) } it { is_expected.not_to be_able_to(:manage, Spree::PromotionAction) } it { is_expected.not_to be_able_to(:manage, Spree::PromotionCategory) } end end
Version data entries
32 entries across 32 versions & 1 rubygems