refactor: update the board type enums

This commit is contained in:
Dinesh Salunke 2024-09-23 07:50:11 +05:30
parent 185a594d32
commit 30027ac0bd
1 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ import (
func TestAPICreateUserProject(t *testing.T) {
defer tests.PrepareTestEnv(t)()
const title, description, boardType = "project_name", "project_description", uint8(project_model.BoardTypeBasicKanban)
const title, description, boardType = "project_name", "project_description", uint8(project_model.TemplateTypeBasicKanban)
token := getUserToken(t, "user2", auth_model.AccessTokenScopeWriteIssue, auth_model.AccessTokenScopeWriteUser)
@ -34,13 +34,13 @@ func TestAPICreateUserProject(t *testing.T) {
DecodeJSON(t, resp, &apiProject)
assert.Equal(t, title, apiProject.Title)
assert.Equal(t, description, apiProject.Description)
assert.Equal(t, boardType, apiProject.BoardType)
assert.Equal(t, boardType, apiProject.TemplateType)
assert.Equal(t, "user2", apiProject.Creator.UserName)
}
func TestAPICreateOrgProject(t *testing.T) {
defer tests.PrepareTestEnv(t)()
const title, description, boardType = "project_name", "project_description", uint8(project_model.BoardTypeBasicKanban)
const title, description, boardType = "project_name", "project_description", uint8(project_model.TemplateTypeBasicKanban)
orgName := "org17"
token := getUserToken(t, "user2", auth_model.AccessTokenScopeWriteIssue, auth_model.AccessTokenScopeWriteOrganization)
@ -56,14 +56,14 @@ func TestAPICreateOrgProject(t *testing.T) {
DecodeJSON(t, resp, &apiProject)
assert.Equal(t, title, apiProject.Title)
assert.Equal(t, description, apiProject.Description)
assert.Equal(t, boardType, apiProject.BoardType)
assert.Equal(t, boardType, apiProject.TemplateType)
assert.Equal(t, "user2", apiProject.Creator.UserName)
assert.Equal(t, "org17", apiProject.Owner.UserName)
}
func TestAPICreateRepoProject(t *testing.T) {
defer tests.PrepareTestEnv(t)()
const title, description, boardType = "project_name", "project_description", uint8(project_model.BoardTypeBasicKanban)
const title, description, boardType = "project_name", "project_description", uint8(project_model.TemplateTypeBasicKanban)
ownerName := "user2"
repoName := "repo1"
@ -80,7 +80,7 @@ func TestAPICreateRepoProject(t *testing.T) {
DecodeJSON(t, resp, &apiProject)
assert.Equal(t, title, apiProject.Title)
assert.Equal(t, description, apiProject.Description)
assert.Equal(t, boardType, apiProject.BoardType)
assert.Equal(t, boardType, apiProject.TemplateType)
assert.Equal(t, "repo1", apiProject.Repo.Name)
}