-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests) Use assert.NoError across project
- Loading branch information
Stephane Leclercq
committed
Jun 17, 2016
1 parent
1c3341b
commit 8d80c87
Showing
7 changed files
with
33 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ func TestProjects(t *testing.T) { | |
ts, gitlab := Stub("stubs/projects/index.json") | ||
projects, err := gitlab.Projects() | ||
|
||
assert.Equal(t, err, nil) | ||
assert.NoError(t, err) | ||
assert.Equal(t, len(projects), 2) | ||
defer ts.Close() | ||
} | ||
|
@@ -18,7 +18,7 @@ func TestProject(t *testing.T) { | |
ts, gitlab := Stub("stubs/projects/show.json") | ||
project, err := gitlab.Project("1") | ||
|
||
assert.Equal(t, err, nil) | ||
assert.NoError(t, err) | ||
assert.IsType(t, new(Project), project) | ||
assert.Equal(t, project.SshRepoUrl, "[email protected]:diaspora/diaspora-project-site.git") | ||
assert.Equal(t, project.HttpRepoUrl, "http://example.com/diaspora/diaspora-project-site.git") | ||
|
@@ -30,7 +30,7 @@ func TestProjectBranches(t *testing.T) { | |
ts, gitlab := Stub("stubs/projects/branches/index.json") | ||
branches, err := gitlab.ProjectBranches("1") | ||
|
||
assert.Equal(t, err, nil) | ||
assert.NoError(t, err) | ||
assert.Equal(t, len(branches), 2) | ||
defer ts.Close() | ||
} | ||
|
@@ -41,7 +41,7 @@ func TestRemoveProject(t *testing.T) { | |
|
||
result, err := gitlab.RemoveProject("1") | ||
|
||
assert.Equal(t, err, nil) | ||
assert.NoError(t, err) | ||
assert.Equal(t, result, true) | ||
} | ||
|
||
|
@@ -50,7 +50,7 @@ func TestListVariables(t *testing.T) { | |
|
||
variables, err := gitlab.ProjectVariables("1") | ||
|
||
assert.Equal(t, err, nil) | ||
assert.NoError(t, err) | ||
assert.Equal(t, len(variables), 2) | ||
defer ts.Close() | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters