Fixes work package relation spec

pull/411/head
Hagen Schink 11 years ago
parent 43ec5bd192
commit 4eb0e5e7f8
  1. 24
      spec/models/work_package_relations_spec.rb

@ -39,30 +39,18 @@ describe WorkPackage do
relation_dup_2_org
end
shared_examples_for "work package closed" do
before { work_package.reload }
subject { work_package.closed? }
it { should be_true }
end
describe "duplicates are closed" do
describe "closes duplicates" do
before do
original.status = closed_state
original.save!
end
context "first duplicate closed" do
let(:work_package) { dup_1 }
it_behaves_like "work package closed"
dup_1.reload
dup_2.reload
end
context "second duplicate closed" do
let(:work_package) { dup_2 }
it_behaves_like "work package closed"
it "duplicates are closed" do
dup_1.closed?.should be_true
dup_2.closed?.should be_true
end
end

Loading…
Cancel
Save