Skip to content

Commit

Permalink
test: add uncontrolled test (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Mar 21, 2024
1 parent d657611 commit ca83398
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion route/v2/internal_web.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ func WebAppGridItemAdapterV2(composeAppWithStoreInfo *codegen.ComposeAppWithStor
// item type
itemAuthorType := composeApp.AuthorType()
item.AuthorType = &itemAuthorType
item.IsUncontrolled = composeAppWithStoreInfo.IsUncontrolled
if composeAppWithStoreInfo.IsUncontrolled == nil {
item.IsUncontrolled = utils.Ptr(false)
} else {
item.IsUncontrolled = composeAppWithStoreInfo.IsUncontrolled
}

return item, nil
}
Expand Down
1 change: 1 addition & 0 deletions route/v2/internal_web_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ func TestWebAppGridItemAdapter(t *testing.T) {
assert.Equal(t, *gridItem.Status, "running")
assert.DeepEqual(t, *gridItem.Title, storeInfo.Title)
assert.Equal(t, *gridItem.AuthorType, codegen.ByCasaos)
assert.Equal(t, *gridItem.IsUncontrolled, false)
}

0 comments on commit ca83398

Please sign in to comment.