Sha256: 31b1a58455f1bc3bc5174a9cf26871d6c4d3d077279eda84850fcd828a2415d4
Contents?: true
Size: 1.31 KB
Versions: 4
Compression:
Stored size: 1.31 KB
Contents
require 'spec_helper' describe Arpa::Entities::Role, type: :entity, fast: true do describe 'initializing' do describe 'setting default values' do context 'when pass some parameters as nil' do it 'attribute :action_ids should be an empty Array' do expect(subject.action_ids).to eq [] end it 'attribute :actions should be an empty Array' do expect(subject.actions).to eq [] end it 'attribute :profiles should be an empty Array' do expect(subject.profiles).to eq [] end it 'attribute :removed should be false' do expect(subject.removed).to be_falsey end end end context 'when pass some parameters as empty' do let(:attrs) { {action_ids: '', actions: '', profiles: '', removed: ''} } subject { Arpa::Entities::Role.new attrs } it 'attribute :action_ids should be an empty Array' do expect(subject.action_ids).to eq [] end it 'attribute :actions should be an empty Array' do expect(subject.actions).to eq [] end it 'attribute :profiles should be an empty Array' do expect(subject.profiles).to eq [] end it 'attribute :removed should be false' do expect(subject.removed).to be_falsey end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
arpa-0.2.0 | spec/lib/arpa/entities/role_spec.rb |
arpa-0.1.0 | spec/lib/arpa/entities/role_spec.rb |
arpa-0.0.9 | spec/lib/arpa/entities/role_spec.rb |
arpa-0.0.8 | spec/lib/ar/entities/role_spec.rb |