mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix(auth): print only a token that belongs to the selected account
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
3 files changed
+17
-2
No files matched your search
@@ -742,7 +742,9 @@ func TestAuthSwitchSelectsInstanceAndAccount(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAuthTokenPrintsTheCredential(t *testing.T) {
|
||||
const instance = "https://example.org"
|
||||
server := newAuthenticatedServer(http.NotFoundHandler())
|
||||
defer server.Close()
|
||||
instance := server.URL
|
||||
deps, out, _ := testDeps(t)
|
||||
configureAccounts(t, deps, instance, "alice", "alice")
|
||||
require.NoError(t, Execute(context.Background(), deps, []string{"auth", "token"}))
|
||||
|
||||
Reference in new issue
Block a user