diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-04-22 23:56:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-22 17:56:27 -0400 |
commit | f1173d6879cb26af21483037fae72542f3088408 (patch) | |
tree | a1ed73fb2a42c351005974698076f5ee82489d5d /models/git | |
parent | ac384c4e1d207a989d0f646ebc14fd0c26427d4c (diff) | |
download | gitea-f1173d6879cb26af21483037fae72542f3088408.tar.gz gitea-f1173d6879cb26af21483037fae72542f3088408.zip |
Use more specific test methods (#24265)
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'models/git')
-rw-r--r-- | models/git/branches_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/git/branches_test.go b/models/git/branches_test.go index b7df7f243e..5d18d9525e 100644 --- a/models/git/branches_test.go +++ b/models/git/branches_test.go @@ -88,12 +88,12 @@ func TestFindRenamedBranch(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) branch, exist, err := git_model.FindRenamedBranch(db.DefaultContext, 1, "dev") assert.NoError(t, err) - assert.Equal(t, true, exist) + assert.True(t, exist) assert.Equal(t, "master", branch.To) _, exist, err = git_model.FindRenamedBranch(db.DefaultContext, 1, "unknow") assert.NoError(t, err) - assert.Equal(t, false, exist) + assert.False(t, exist) } func TestRenameBranch(t *testing.T) { @@ -115,7 +115,7 @@ func TestRenameBranch(t *testing.T) { return nil })) - assert.Equal(t, true, _isDefault) + assert.True(t, _isDefault) repo1 = unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) assert.Equal(t, "main", repo1.DefaultBranch) |