Skip to content

Fix "Custom visibility" test to validate non-default behavior#227

Closed
Copilot wants to merge 1 commit intofeat-make-tak-invisible-on-creationfrom
copilot/sub-pr-226
Closed

Fix "Custom visibility" test to validate non-default behavior#227
Copilot wants to merge 1 commit intofeat-make-tak-invisible-on-creationfrom
copilot/sub-pr-226

Conversation

Copy link
Contributor

Copilot AI commented Dec 20, 2025

The bot reviewer correctly identified that the "Custom visibility" test was testing default behavior (IsVisible: false) instead of custom behavior. This has been corrected.

Changes

  • Test coverage now properly validates both behaviors:
    • "Success" test: validates default IsVisible: false when not explicitly set
    • "Custom visibility" test: validates custom IsVisible: true when explicitly set
t.Run("Custom visibility", func(t *testing.T) {
    task := &schemas.Task{
        Title:     "Visible Task",
        CreatedBy: adminUser.ID,
        IsVisible: true,  // Changed from false to test non-default
    }
    // ...
    tr.EXPECT().Create(gomock.Any(), gomock.Any()).DoAndReturn(func(_ database.Database, model *models.Task) (int64, error) {
        assert.True(t, model.IsVisible)  // Changed from False to True
        return int64(2), nil
    }).Times(1)
    // ...
})

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update default visibility of newly created tasks Fix "Custom visibility" test to validate non-default behavior Dec 20, 2025
Copilot AI requested a review from TheRealSeber December 20, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments