summaryrefslogtreecommitdiffstats
path: root/models/status_test.go
diff options
context:
space:
mode:
authorMorlinest <Morlinest@users.noreply.github.com>2017-08-28 11:17:45 +0200
committerLauris BH <lauris@nix.lv>2017-08-28 12:17:45 +0300
commit8e61823ec403b661359373f8f8b0c9a7c9ea368d (patch)
tree0ee6d56bf3f1c01348afa2a2f03dfbd6f72815de /models/status_test.go
parentced50e0ec13085504fa19c82f018a2eecb70ff68 (diff)
downloadgitea-8e61823ec403b661359373f8f8b0c9a7c9ea368d.tar.gz
gitea-8e61823ec403b661359373f8f8b0c9a7c9ea368d.zip
Fix tests code to prevent some runtime errors (#2381)
* Fix tests code to prevent some runtime errors * Reduce nesting
Diffstat (limited to 'models/status_test.go')
-rw-r--r--models/status_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/status_test.go b/models/status_test.go
index 5585fb1dcc..78d2370f9d 100644
--- a/models/status_test.go
+++ b/models/status_test.go
@@ -19,8 +19,7 @@ func TestGetCommitStatuses(t *testing.T) {
statuses, err := GetCommitStatuses(repo1, sha1, 0)
assert.NoError(t, err)
- if assert.Equal(t, 5, len(statuses), "Expected to get 5 statuses") {
-
+ if assert.Len(t, statuses, 5) {
assert.Equal(t, statuses[0].Context, "ci/awesomeness")
assert.Equal(t, statuses[0].State, CommitStatusPending)