Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
bsoniam committed Jun 21, 2019
1 parent 4422819 commit 1589e9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/management/component_test.go
Expand Up @@ -1281,8 +1281,8 @@ func TestExecuteActionsEmail(t *testing.T) {
var accessToken = "TOKEN=="
var realmName = "master"
var userID = "1245-7854-8963"
var reqActions = []api.RequiredAction{"action1", "action2"}
var actions = []string{"action1", "action2"}
var reqActions = []api.RequiredAction{"sms-password-set", "action1", "action2"}
var actions = []string{"sms-password-set", "action1", "action2"}

var key1 = "key1"
var value1 = "value1"
Expand All @@ -1291,9 +1291,11 @@ func TestExecuteActionsEmail(t *testing.T) {

// Send email actions
{

mockKeycloakClient.EXPECT().ExecuteActionsEmail(accessToken, realmName, userID, actions, key1, value1, key2, value2).Return(nil).Times(1)

var ctx = context.WithValue(context.Background(), cs.CtContextAccessToken, accessToken)
mockEventDBModule.EXPECT().ReportEvent(ctx, "INIT_PASSWORD", "back-office", gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()

err := managementComponent.ExecuteActionsEmail(ctx, "master", userID, reqActions, key1, value1, key2, value2)

Expand Down

0 comments on commit 1589e9d

Please sign in to comment.