- Notifications
You must be signed in to change notification settings - Fork928
feat: allow admins to modify notification template delivery method#14116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
2f78056
09da48f
31da811
02fbaaf
2d4dc17
1d84f4a
f77c2c5
0546f24
c2f024e
a909329
821fdf5
4ba160d
061b2bf
8a6e289
d627fef
d1817d1
33e9bc9
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -16,6 +16,16 @@ import ( | ||
"github.com/coder/coder/v2/testutil" | ||
) | ||
funccreateOpts(t*testing.T)*coderdtest.Options { | ||
dannykopping marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
t.Helper() | ||
dt:=coderdtest.DeploymentValues(t) | ||
dt.Experiments= []string{string(codersdk.ExperimentNotifications)} | ||
return&coderdtest.Options{ | ||
DeploymentValues:dt, | ||
} | ||
} | ||
funcTestNotifications(t*testing.T) { | ||
t.Parallel() | ||
@@ -42,7 +52,7 @@ func TestNotifications(t *testing.T) { | ||
t.Parallel() | ||
// given | ||
ownerClient,db:=coderdtest.NewWithDatabase(t,createOpts(t)) | ||
_=coderdtest.CreateFirstUser(t,ownerClient) | ||
// when | ||
@@ -72,7 +82,7 @@ func TestPauseNotifications_RegularUser(t *testing.T) { | ||
t.Parallel() | ||
// given | ||
ownerClient,db:=coderdtest.NewWithDatabase(t,createOpts(t)) | ||
owner:=coderdtest.CreateFirstUser(t,ownerClient) | ||
anotherClient,_:=coderdtest.CreateAnotherUser(t,ownerClient,owner.OrganizationID) | ||
@@ -87,7 +97,7 @@ func TestPauseNotifications_RegularUser(t *testing.T) { | ||
require.Error(t,err) | ||
require.ErrorAsf(t,err,&sdkError,"error should be of type *codersdk.Error") | ||
assert.Equal(t,http.StatusForbidden,sdkError.StatusCode()) | ||
assert.Contains(t,sdkError.Message,"Forbidden.") | ||
// then | ||
ctx,cancel:=context.WithTimeout(context.Background(),testutil.WaitShort) | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.