diff options
author | Andrew8xx8 <avk@8xx8.ru> | 2013-02-18 13:10:09 +0400 |
---|---|---|
committer | Andrew8xx8 <avk@8xx8.ru> | 2013-02-18 14:43:50 +0400 |
commit | 0b512af803d007852bcba40c75203e0e45dda177 (patch) | |
tree | d85179b7bf98fb9de7cd7c6d7d7557dfe8db0939 /spec/models/milestone_spec.rb | |
parent | 29f70acc987abe0b188ef187c70f179088d79589 (diff) | |
download | gitlab-ce-0b512af803d007852bcba40c75203e0e45dda177.tar.gz |
Milestone uses StateMachine now
Diffstat (limited to 'spec/models/milestone_spec.rb')
-rw-r--r-- | spec/models/milestone_spec.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index 8871bf4a156..cdf0715a869 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -27,7 +27,6 @@ describe Milestone do describe "Validation" do it { should validate_presence_of(:title) } it { should validate_presence_of(:project) } - it { should ensure_inclusion_of(:closed).in_array([true, false]) } end let(:milestone) { create(:milestone) } @@ -41,7 +40,7 @@ describe Milestone do it "should count closed issues" do IssueObserver.current_user = issue.author - issue.update_attributes(closed: true) + issue.close milestone.issues << issue milestone.percent_complete.should == 100 end @@ -96,7 +95,7 @@ describe Milestone do describe :items_count do before do milestone.issues << create(:issue) - milestone.issues << create(:issue, closed: true) + milestone.issues << create(:closed_issue) milestone.merge_requests << create(:merge_request) end @@ -109,8 +108,4 @@ describe Milestone do describe :can_be_closed? do it { milestone.can_be_closed?.should be_true } end - - describe :open? do - it { milestone.open?.should be_true } - end end |