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
0
Merge Requests
0
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
Léo-Paul Géneau
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
Hide 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,29 +167,29 @@ describe Project do
...
@@ -167,29 +167,29 @@ 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
end
it
{
project
.
last_activity
.
should
==
last_event
}
describe
'last_activity_date'
do
end
it
'returns the creation date of the project\'s last event if present'
do
project
.
stub
(
last_event:
last_event
)
describe
'last_activity_date'
do
project
.
last_activity_date
.
should
==
last_event
.
created_at
let
(
:project
)
{
Factory
:project
}
end
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
.
last_activity_date
.
should
==
last_event
.
created_at
end
it
'returns the project\'s last update date if it has no events'
do
it
'returns the project\'s last update date if it has no events'
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