Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit828694c

Browse files
committed
API tests
1 parent9f66e1a commit828694c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎coderd/notifications_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@ import (
1313
funcTestUpdateNotificationsSettings(t*testing.T) {
1414
t.Parallel()
1515

16+
t.Run("Permissions denied",func(t*testing.T) {
17+
t.Parallel()
18+
19+
api:=coderdtest.New(t,nil)
20+
firstUser:=coderdtest.CreateFirstUser(t,api)
21+
anotherClient,_:=coderdtest.CreateAnotherUser(t,api,firstUser.OrganizationID)
22+
23+
// given
24+
expected:= codersdk.NotificationsSettings{
25+
NotifierPaused:true,
26+
}
27+
28+
ctx:=testutil.Context(t,testutil.WaitShort)
29+
30+
// when
31+
err:=anotherClient.PutNotificationsSettings(ctx,expected)
32+
33+
// then
34+
require.Error(t,err)// Insufficient permissions to update notifications settings.
35+
})
36+
1637
t.Run("Settings modified",func(t*testing.T) {
1738
t.Parallel()
1839

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp