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
7dbb272f
Commit
7dbb272f
authored
Jul 28, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve spec for GeoNodeStatus model
parent
a089df71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
spec/models/geo_node_status_spec.rb
spec/models/geo_node_status_spec.rb
+17
-0
No files found.
spec/models/geo_node_status_spec.rb
View file @
7dbb272f
...
...
@@ -126,6 +126,23 @@ describe GeoNodeStatus do
end
end
describe
'#repositories_failed_count'
do
before
do
create
(
:geo_project_registry
,
:sync_failed
,
project:
project_1
)
create
(
:geo_project_registry
,
:sync_failed
,
project:
project_3
)
end
it
'returns the right number of failed repos with no group restrictions'
do
expect
(
subject
.
repositories_failed_count
).
to
eq
(
2
)
end
it
'returns the right number of failed repos with group restrictions'
do
geo_node
.
update_attribute
(
:groups
,
[
group
])
expect
(
subject
.
repositories_failed_count
).
to
eq
(
1
)
end
end
describe
'#repositories_synced_in_percentage'
do
it
'returns 0 when no projects are available'
do
expect
(
subject
.
repositories_synced_in_percentage
).
to
eq
(
0
)
...
...
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