Make IssueObserver handle issus, not MailerObserver
This commit is contained in:
parent
356430c3c0
commit
6617eaaf9b
6 changed files with 64 additions and 21 deletions
|
@ -55,6 +55,26 @@ describe Issue do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
describe '#is_being_reopened?' do
|
||||
it 'returns true if the closed attribute has changed and is now false' do
|
||||
issue = Factory.create(:issue,
|
||||
:closed => true,
|
||||
:author => Factory(:user),
|
||||
:assignee => Factory(:user),
|
||||
:project => Factory.create(:project))
|
||||
issue.closed = false
|
||||
issue.is_being_reopened?.should be_true
|
||||
end
|
||||
it 'returns false if the closed attribute has changed and is now true' do
|
||||
subject.closed = true
|
||||
subject.is_being_reopened?.should be_false
|
||||
end
|
||||
it 'returns false if the closed attribute has not changed' do
|
||||
subject.is_being_reopened?.should be_false
|
||||
end
|
||||
end
|
||||
|
||||
describe "plus 1" do
|
||||
let(:project) { Factory(:project) }
|
||||
subject {
|
||||
|
@ -86,6 +106,7 @@ describe Issue do
|
|||
subject.upvotes.should == 2
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
# == Schema Information
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue