diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-10-17 23:02:52 +0400 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-10-17 23:02:52 +0400 |
commit | e0c43c46ddd7f9488ef076e0c91800e43bd376b3 (patch) | |
tree | 7d6bce048db302743418e3ad723a29bbb86d4bd0 /spec/models | |
parent | a9a3480de97296234fad349fe25aac6f11cf9285 (diff) |
Added project has_one :last_event assoc. Fixed tab line-height after font-awesome. Increased projects per page on dashboard
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index b7d846e8c57..f78ce86b266 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -169,10 +169,9 @@ describe Project do describe "last_activity" do let(:project) { Factory :project } - let(:last_event) { double } before do - project.stub_chain(:events, :order).and_return( [ double, double, last_event ] ) + project.stub(last_event: double) end it { project.last_activity.should == last_event } @@ -182,8 +181,8 @@ describe Project do let(:project) { Factory :project } it 'returns the creation date of the project\'s last event if present' do - last_event = double(created_at: 'now') - project.stub(:events).and_return( [double, double, last_event] ) + last_event = double(created_at: Time.now) + project.stub(last_event: last_event) project.last_activity_date.should == last_event.created_at end |