Skip to content

Commit 23eeebf

Browse files
author
Muhammad Idil Haq Amir
committed
test: update test
1 parent 9ae2463 commit 23eeebf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/appeal/service_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,16 +1568,16 @@ func (s *ServiceTestSuite) TestCreate() {
15681568
Return(nil).Once()
15691569

15701570
actualError := h.service.Create(context.Background(), appeals)
1571-
time.Sleep(time.Millisecond)
15721571

15731572
s.Nil(actualError)
15741573
s.Equal(expectedResult, appeals)
1574+
1575+
time.Sleep(time.Millisecond)
15751576
})
15761577

15771578
s.Run("additional appeal creation", func() {
15781579
s.Run("should use the overridding policy", func() {
15791580
h := newServiceTestHelper()
1580-
defer h.assertExpectations(s.T())
15811581
input := &domain.Appeal{
15821582
ResourceID: uuid.New().String(),
15831583
AccountID: "[email protected]",
@@ -1666,11 +1666,13 @@ func (s *ServiceTestSuite) TestCreate() {
16661666
h.mockProviderService.EXPECT().GrantAccess(mock.Anything, mock.Anything).Return(nil).Once()
16671667

16681668
err := h.service.Create(context.Background(), []*domain.Appeal{input}, appeal.CreateWithAdditionalAppeal())
1669-
time.Sleep(time.Millisecond)
16701669

16711670
s.NoError(err)
16721671
s.Equal("test-approval", input.Approvals[0].Name)
16731672
s.Equal(expectedPermissions, input.Permissions)
1673+
1674+
time.Sleep(time.Millisecond)
1675+
h.assertExpectations(s.T())
16741676
})
16751677
})
16761678
}

0 commit comments

Comments
 (0)