Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
07bee06b
Commit
07bee06b
authored
Nov 05, 2015
by
Martin Sefcik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests output
parent
a659453f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
projects_test.go
projects_test.go
+11
-10
No files found.
projects_test.go
View file @
07bee06b
...
...
@@ -12,17 +12,18 @@ func TestListAllProjects(t *testing.T) {
projects
,
_
,
err
:=
client
.
Projects
.
ListAllProjects
(
opt
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
f
(
"Expected error nil, got: %v"
,
err
)
}
if
len
(
projects
)
!=
2
{
t
.
Fail
()
count
:=
len
(
projects
)
if
count
!=
2
{
t
.
Errorf
(
"Expected number of projects %q, got %q"
,
2
,
count
)
}
if
projects
[
0
]
.
Name
!=
"project"
{
t
.
Fail
(
)
t
.
Errorf
(
"Expected project name %q, got %q"
,
"project"
,
projects
[
0
]
.
Name
)
}
if
projects
[
1
]
.
Name
!=
"project2"
{
t
.
Fail
(
)
t
.
Errorf
(
"Expected project name %q, got %q"
,
"project2"
,
projects
[
1
]
.
Name
)
}
}
...
...
@@ -33,19 +34,19 @@ func TestGetProject(t *testing.T) {
project
,
_
,
err
:=
client
.
Projects
.
GetProject
(
1
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
f
(
"Expected error nil, got: %v"
,
err
)
}
if
project
.
Name
!=
"project"
{
t
.
Fail
(
)
t
.
Errorf
(
"Expected project name %q, got %q"
,
"project"
,
project
.
Name
)
}
if
project
.
Namespace
.
Name
!=
"group"
{
t
.
Fail
(
)
t
.
Errorf
(
"Expected namespace name %q, got %q"
,
"group"
,
project
.
Namespace
.
Name
)
}
if
project
.
Permissions
.
ProjectAccess
.
AccessLevel
!=
MasterPermissions
{
t
.
Fail
(
)
t
.
Errorf
(
"Expected project access level %q, got %q"
,
MasterPermissions
,
project
.
Permissions
.
ProjectAccess
.
AccessLevel
)
}
if
project
.
Permissions
.
GroupAccess
!=
nil
{
t
.
Fail
(
)
t
.
Errorf
(
"Expected project group access nil, got %q"
,
project
.
Permissions
.
GroupAccess
)
}
}
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