Sha256: 13bb5e0e7e30388f57872b85325215811bbd8a6e30b1c7d3f93fb04475e9467e
Contents?: true
Size: 1.38 KB
Versions: 5
Compression:
Stored size: 1.38 KB
Contents
require 'spec_helper' describe Spree::PermissionSets::PromotionDisplay 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(:display, Spree::Promotion) } it { is_expected.to be_able_to(:display, Spree::PromotionRule) } it { is_expected.to be_able_to(:display, Spree::PromotionAction) } it { is_expected.to be_able_to(:display, Spree::PromotionCategory) } it { is_expected.to be_able_to(:admin, Spree::Promotion) } it { is_expected.to be_able_to(:admin, Spree::PromotionRule) } it { is_expected.to be_able_to(:admin, Spree::PromotionAction) } it { is_expected.to be_able_to(:admin, Spree::PromotionCategory) } end context "when not activated" do it { is_expected.not_to be_able_to(:display, Spree::Promotion) } it { is_expected.not_to be_able_to(:display, Spree::PromotionRule) } it { is_expected.not_to be_able_to(:display, Spree::PromotionAction) } it { is_expected.not_to be_able_to(:display, Spree::PromotionCategory) } it { is_expected.not_to be_able_to(:admin, Spree::Promotion) } it { is_expected.not_to be_able_to(:admin, Spree::PromotionRule) } it { is_expected.not_to be_able_to(:admin, Spree::PromotionAction) } it { is_expected.not_to be_able_to(:admin, Spree::PromotionCategory) } end end
Version data entries
5 entries across 5 versions & 1 rubygems