end of train commit
This commit is contained in:
@@ -13,4 +13,14 @@ describe Employee do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#object_attributes' do
|
||||
let(:supplier){ create :supplier, employee_ids: [employee.id], employee_settings_storage: {employee.id => {manager: true}}}
|
||||
let(:employee){ create :employee }
|
||||
subject { employee.enrich_with_settings(supplier.settings_for(employee)).object_attributes }
|
||||
its(:keys){ should include 'id'}
|
||||
its(:keys){ should_not include '_id'}
|
||||
its(['id']){ should eq employee.id }
|
||||
its(['manager']){ should be true }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user