diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-15 00:05:10 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-15 00:05:10 +0400 |
commit | b79e00881ec441c7266e8aca6083a3eb9586cd40 (patch) | |
tree | 5586b89268005bcacd9b56f7b116385cfff56abf /spec | |
parent | 0ff468160e11270af7178d2494d0d6dabde20a6e (diff) |
Uncommented test observing comment event
Diffstat (limited to 'spec')
-rw-r--r-- | spec/observers/activity_observer_spec.rb | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/spec/observers/activity_observer_spec.rb b/spec/observers/activity_observer_spec.rb index 0eec41f44e9..6af5d070888 100644 --- a/spec/observers/activity_observer_spec.rb +++ b/spec/observers/activity_observer_spec.rb @@ -34,15 +34,17 @@ describe ActivityObserver do it { @event.target.should == @issue } end - #describe "Issue commented" do - #before do - #@issue = create(:issue, project: project) - #@note = create(:note, noteable: @issue, project: project) - #@event = Event.last - #end - - #it_should_be_valid_event - #it { @event.action.should == Event::Commented } - #it { @event.target.should == @note } - #end + describe "Issue commented" do + before do + Note.observers.enable :activity_observer do + @issue = create(:issue, project: project) + @note = create(:note, noteable: @issue, project: project, author: @issue.author) + @event = Event.last + end + end + + it_should_be_valid_event + it { @event.action.should == Event::Commented } + it { @event.target.should == @note } + end end |