Sha256: e7b04a1296a08642abbc00c69b895716665c7b8943e347156d470a5046e72629
Contents?: true
Size: 1.43 KB
Versions: 5
Compression:
Stored size: 1.43 KB
Contents
require 'spec_helper' describe Spree::PermissionSets::UserDisplay 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.user_class) } it { is_expected.to be_able_to(:admin, Spree.user_class) } it { is_expected.to be_able_to(:edit, Spree.user_class) } it { is_expected.to be_able_to(:addresses, Spree.user_class) } it { is_expected.to be_able_to(:orders, Spree.user_class) } it { is_expected.to be_able_to(:items, Spree.user_class) } it { is_expected.to be_able_to(:display, Spree::StoreCredit) } it { is_expected.to be_able_to(:admin, Spree::StoreCredit) } it { is_expected.to be_able_to(:display, Spree::Role) } end context "when not activated" do it { is_expected.not_to be_able_to(:display, Spree.user_class) } it { is_expected.not_to be_able_to(:admin, Spree.user_class) } it { is_expected.not_to be_able_to(:edit, Spree.user_class) } it { is_expected.not_to be_able_to(:addresses, Spree.user_class) } it { is_expected.not_to be_able_to(:orders, Spree.user_class) } it { is_expected.not_to be_able_to(:items, Spree.user_class) } it { is_expected.not_to be_able_to(:display, Spree::StoreCredit) } it { is_expected.not_to be_able_to(:admin, Spree::StoreCredit) } it { is_expected.not_to be_able_to(:display, Spree::Role) } end end
Version data entries
5 entries across 5 versions & 1 rubygems