Sha256: f66fd4cdc60937d6f438b7d2f55359c549fa2b5b92742a1dc77c2e80db787100
Contents?: true
Size: 853 Bytes
Versions: 9
Compression:
Stored size: 853 Bytes
Contents
require 'spec_helper' describe Spree::Admin::ReimbursementsHelper, type: :helper do describe '.reimbursement_status_color' do subject { helper.reimbursement_status_color(reimbursement) } let(:reimbursement) do Spree::Reimbursement.new(reimbursement_status: status) end context 'when status is reimbursed' do let(:status) { 'reimbursed' } it { is_expected.to eq 'success'} end context 'when status is pending' do let(:status) { 'pending' } it { is_expected.to eq 'notice'} end context 'when status is pending' do let(:status) { 'errored' } it { is_expected.to eq 'error'} end context 'when status is not valid' do let(:status) { 'noop' } it 'should raise an error' do expect{ subject }.to raise_error(RuntimeError) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems