Sha256: 40d8c05765650955a5809ba2540307ce35ee1e76a55421d657d6d8b7f2a2a5ac
Contents?: true
Size: 1.88 KB
Versions: 11
Compression:
Stored size: 1.88 KB
Contents
require 'spec_helper' describe Spree::PermissionSets::OrderManagement 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::Order) } it { is_expected.to be_able_to(:manage, Spree::Payment) } it { is_expected.to be_able_to(:manage, Spree::Shipment) } it { is_expected.to be_able_to(:manage, Spree::Adjustment) } it { is_expected.to be_able_to(:manage, Spree::LineItem) } it { is_expected.to be_able_to(:manage, Spree::ReturnAuthorization) } it { is_expected.to be_able_to(:manage, Spree::CustomerReturn) } it { is_expected.to be_able_to(:display, Spree::ReimbursementType) } it { is_expected.to be_able_to(:manage, Spree::OrderCancellations) } it { is_expected.to be_able_to(:manage, Spree::Reimbursement) } it { is_expected.to be_able_to(:manage, Spree::ReturnItem) } it { is_expected.to be_able_to(:manage, Spree::Refund) } end context "when not activated" do it { is_expected.not_to be_able_to(:manage, Spree::Order) } it { is_expected.not_to be_able_to(:manage, Spree::Payment) } it { is_expected.not_to be_able_to(:manage, Spree::Shipment) } it { is_expected.not_to be_able_to(:manage, Spree::Adjustment) } it { is_expected.not_to be_able_to(:manage, Spree::LineItem) } it { is_expected.not_to be_able_to(:manage, Spree::ReturnAuthorization) } it { is_expected.not_to be_able_to(:manage, Spree::CustomerReturn) } it { is_expected.not_to be_able_to(:display, Spree::ReimbursementType) } it { is_expected.not_to be_able_to(:manage, Spree::OrderCancellations) } it { is_expected.not_to be_able_to(:manage, Spree::Reimbursement) } it { is_expected.not_to be_able_to(:manage, Spree::ReturnItem) } it { is_expected.not_to be_able_to(:manage, Spree::Refund) } end end
Version data entries
11 entries across 11 versions & 1 rubygems