Corrected preparations required by spec

Some tiny style improvement
pull/2598/head
Alexander Bach 10 years ago
parent 2c8ae67c9e
commit 4399787256
  1. 10
      spec/lib/api/v3/work_packages/schema/work_package_schema_spec.rb

@ -117,8 +117,12 @@ describe ::API::V3::WorkPackages::Schema::WorkPackageSchema do
end end
describe 'utility methods' do describe 'utility methods' do
it 'detects leaf' do context 'leaf' do
expect(subject.nil_or_leaf? work_package).to be true let(:work_package) { FactoryGirl.create(:work_package) }
it 'detects leaf' do
expect(subject.nil_or_leaf? work_package).to be true
end
end end
context 'parent' do context 'parent' do
@ -161,7 +165,7 @@ describe ::API::V3::WorkPackages::Schema::WorkPackageSchema do
describe 'leaf or nil' do describe 'leaf or nil' do
it 'evaluates nil work package as nil' do it 'evaluates nil work package as nil' do
expect(subject.nil_or_leaf? nil).to be_true expect(subject.nil_or_leaf? nil).to be true
end end
end end
end end

Loading…
Cancel
Save