Sha256: 792c1f8ccaa7c4cd22dd25eacfb3fdfea513e8805def8631fe98170f0e362c43
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arpa-0.3.0 | spec/lib/arpa/entities/role_spec.rb |