end of train commit

This commit is contained in:
2015-09-16 18:10:23 +02:00
parent 6a085b1ca2
commit 8e931cabd4
7 changed files with 23 additions and 6 deletions
+10
View File
@@ -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