Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Aug 3, 2024
1 parent 764967f commit 224d1c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/Actions.HttpClient.Tests/AuthTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task HttpGetRequestWithBasicAuthCorrectlyDeserializesTypedResponse(
var auth = response.Result.Headers["authorization"];
var creds = auth["Basic ".Length..].FromBase64();
Assert.Equal("johndoe:password", creds);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
}

[Fact]
Expand All @@ -55,7 +55,7 @@ public async Task HttpGetRequestWithBearerAuthCorrectlyDeserializesTypedResponse
Assert.NotNull(response.Result);
var auth = response.Result.Headers["authorization"];
Assert.Equal($"Bearer {token}", auth);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
}

[Fact]
Expand All @@ -79,6 +79,6 @@ public async Task HttpGetRequestWithPatAuthCorrectlyDeserializesTypedResponse()
var auth = response.Result.Headers["authorization"];
var creds = auth["Basic ".Length..].FromBase64();
Assert.Equal($"PAT:{pat}", creds);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
}
}
10 changes: 5 additions & 5 deletions tests/Actions.HttpClient.Tests/BasicTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task DoesBasicHttpGetRequestWithNoUserAgent()
Assert.NotNull(response);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
Assert.NotNull(response.Result);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
Assert.False(response.Result.Headers.ContainsKey("user-agent"));
}

Expand All @@ -70,7 +70,7 @@ public async Task DoesBasicHttpGetRequestWithDefaultHeaders()
Assert.NotNull(response);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
Assert.NotNull(response.Result);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
Assert.Equal("application/json", response.Result.Headers["accept"]);
}

Expand All @@ -90,7 +90,7 @@ public async Task DoesBasicHttpGetRequestWithMergedHeaders()
Assert.NotNull(response);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
Assert.NotNull(response.Result);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
}

[Fact]
Expand All @@ -109,7 +109,7 @@ public async Task DoesBasicGetRequestWithRedirect()
Assert.NotNull(response);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
Assert.NotNull(response.Result);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
}

[Fact]
Expand Down Expand Up @@ -147,7 +147,7 @@ public async Task DoesNotPassAuthWithDiffHostnameRedirects()
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
Assert.NotNull(response.Result);
Assert.Equal("application/json", response.Result.Headers["accept"]);
Assert.Equal("http://postman-echo.com/get", response.Result.Url);
Assert.Equal("https://postman-echo.com/get", response.Result.Url);
Assert.False(response.Result.Headers.ContainsKey("authorization"));
Assert.False(response.Result.Headers.ContainsKey("Authorization"));
}
Expand Down

0 comments on commit 224d1c9

Please sign in to comment.