Commit d246a68a authored by randx's avatar randx
Browse files

fix project.last_activity spec

parent f1a5ac7ce33f
......@@ -158,7 +158,7 @@ def private?
end
def last_activity
events.order("created_at DESC").first || nil
events.order("created_at ASC").last
end
def last_activity_date
......
......@@ -141,7 +141,7 @@
let(:last_event) { double }
before do
project.stub(:events).and_return( [ double, double, last_event ] )
project.stub_chain(:events, :order).and_return( [ double, double, last_event ] )
end
it { project.last_activity.should == last_event }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment