@@ -47,7 +47,7 @@ func TestLogoutCommand(t *testing.T) {
4747 clientsMock .AuthInterface .On ("DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [1 ]).Return (types.SlackAuth {}, nil )
4848 },
4949 ExpectedOutputs : []string {"Authorization successfully revoked for all teams" },
50- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
50+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
5151 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [0 ].Token )
5252 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [0 ].RefreshToken )
5353 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [1 ].Token )
@@ -74,7 +74,7 @@ func TestLogoutCommand(t *testing.T) {
7474 clientsMock .AuthInterface .On ("DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [0 ]).Return (types.SlackAuth {}, nil )
7575 },
7676 ExpectedOutputs : []string {"Authorization successfully revoked for team1" },
77- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
77+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
7878 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [0 ].Token )
7979 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [0 ].RefreshToken )
8080 clients .AuthInterface .AssertCalled (t , "DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [0 ])
@@ -98,7 +98,7 @@ func TestLogoutCommand(t *testing.T) {
9898 clientsMock .AuthInterface .On ("DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [1 ]).Return (types.SlackAuth {}, nil )
9999 },
100100 ExpectedOutputs : []string {"Authorization successfully revoked for team2" },
101- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
101+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
102102 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [1 ].Token )
103103 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [1 ].RefreshToken )
104104 clients .AuthInterface .AssertCalled (t , "DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [1 ])
@@ -108,7 +108,7 @@ func TestLogoutCommand(t *testing.T) {
108108 "require a team value with the flag" : {
109109 CmdArgs : []string {"--team" , "" },
110110 ExpectedErrorStrings : []string {"The argument is missing from the --team flag (missing_flag)" },
111- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
111+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
112112 clients .AuthInterface .AssertNotCalled (t , "RevokeToken" )
113113 clients .IO .AssertNotCalled (t , "SelectPrompt" , mock .Anything , "Select an workspace authorization to revoke" , mock .Anything , mock .Anything )
114114 },
@@ -125,7 +125,7 @@ func TestLogoutCommand(t *testing.T) {
125125 }, nil )
126126 },
127127 ExpectedErrorStrings : []string {"invalid_auth" , "Cannot revoke authentication tokens for 'randomteamdomain'" },
128- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
128+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
129129 clients .AuthInterface .AssertNotCalled (t , "RevokeToken" )
130130 clients .IO .AssertCalled (t , "SelectPrompt" , mock .Anything , "Select an authorization to revoke" , mock .Anything , mock .Anything )
131131 },
@@ -151,7 +151,7 @@ func TestLogoutCommand(t *testing.T) {
151151 clientsMock .AuthInterface .On ("DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [1 ]).Return (types.SlackAuth {}, nil )
152152 },
153153 ExpectedOutputs : []string {"Authorization successfully revoked for team2" },
154- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
154+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
155155 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [1 ].Token )
156156 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [1 ].RefreshToken )
157157 clients .AuthInterface .AssertCalled (t , "DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [1 ])
@@ -171,7 +171,7 @@ func TestLogoutCommand(t *testing.T) {
171171 clientsMock .AuthInterface .On ("DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [0 ]).Return (types.SlackAuth {}, nil )
172172 },
173173 ExpectedOutputs : []string {"Authorization successfully revoked for team1" },
174- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
174+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
175175 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [0 ].Token )
176176 clients .AuthInterface .AssertCalled (t , "RevokeToken" , mock .Anything , fakeAuthsByTeamSlice [0 ].RefreshToken )
177177 clients .AuthInterface .AssertCalled (t , "DeleteAuth" , mock .Anything , fakeAuthsByTeamSlice [0 ])
@@ -192,7 +192,7 @@ func TestLogoutCommand(t *testing.T) {
192192 }, nil )
193193 },
194194 ExpectedErrorStrings : []string {"invalid_auth" , "Cannot revoke authentication tokens for 'anotherteam'" },
195- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
195+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
196196 clients .AuthInterface .AssertNotCalled (t , "RevokeToken" )
197197 clients .IO .AssertCalled (t , "SelectPrompt" , mock .Anything , "Select an authorization to revoke" , mock .Anything , mock .Anything )
198198 },
@@ -203,7 +203,7 @@ func TestLogoutCommand(t *testing.T) {
203203 clientsMock .AuthInterface .On ("Auths" , mock .Anything ).Return ([]types.SlackAuth {}, nil )
204204 },
205205 ExpectedOutputs : []string {"All authorizations successfully revoked" },
206- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
206+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
207207 clients .AuthInterface .AssertNotCalled (t , "RevokeToken" )
208208 clients .IO .AssertNotCalled (t , "SelectPrompt" , mock .Anything , "Select an authorization to revoke" , mock .Anything , mock .Anything )
209209 },
@@ -219,7 +219,7 @@ func TestLogoutCommand(t *testing.T) {
219219 Option : "someteam" ,
220220 }, nil )
221221 },
222- ExpectedAsserts : func (t * testing.T , clients * shared.ClientsMock ) {
222+ ExpectedAsserts : func (t * testing.T , ctx context. Context , clients * shared.ClientsMock ) {
223223 clients .AuthInterface .AssertNotCalled (t , "RevokeToken" )
224224 clients .IO .AssertCalled (t , "SelectPrompt" , mock .Anything , "Select an authorization to revoke" , mock .Anything , mock .Anything )
225225 },
0 commit comments