Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
db469ea3
Commit
db469ea3
authored
Oct 17, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing broken test of project last_activity
parent
e0c43c46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
spec/models/project_spec.rb
spec/models/project_spec.rb
+16
-16
No files found.
spec/models/project_spec.rb
View file @
db469ea3
...
@@ -167,21 +167,19 @@ describe Project do
...
@@ -167,21 +167,19 @@ describe Project do
end
end
end
end
describe
"last_activity"
do
describe
"last_activity
methods
"
do
let
(
:project
)
{
Factory
:project
}
let
(
:project
)
{
Factory
:project
}
let
(
:last_event
)
{
double
(
created_at:
Time
.
now
)
}
before
do
describe
"last_activity"
do
project
.
stub
(
last_event:
double
)
it
"should alias last_activity to last_event"
do
project
.
stub
(
last_event:
last_event
)
project
.
last_activity
.
should
==
last_event
end
end
it
{
project
.
last_activity
.
should
==
last_event
}
end
end
describe
'last_activity_date'
do
describe
'last_activity_date'
do
let
(
:project
)
{
Factory
:project
}
it
'returns the creation date of the project\'s last event if present'
do
it
'returns the creation date of the project\'s last event if present'
do
last_event
=
double
(
created_at:
Time
.
now
)
project
.
stub
(
last_event:
last_event
)
project
.
stub
(
last_event:
last_event
)
project
.
last_activity_date
.
should
==
last_event
.
created_at
project
.
last_activity_date
.
should
==
last_event
.
created_at
end
end
...
@@ -190,6 +188,8 @@ describe Project do
...
@@ -190,6 +188,8 @@ describe Project do
project
.
last_activity_date
.
should
==
project
.
updated_at
project
.
last_activity_date
.
should
==
project
.
updated_at
end
end
end
end
end
describe
"fresh commits"
do
describe
"fresh commits"
do
let
(
:project
)
{
Factory
:project
}
let
(
:project
)
{
Factory
:project
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment