Skip to content

Commit d18bb7f

Browse files
committed
chore: removes redundant time test
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent 108e2bb commit d18bb7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/abstractions/test/common/requestInformation.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ describe("RequestInformation", () => {
223223
});
224224

225225
it("should correctly handle custom type in query/path parameter", () => {
226-
const expected: string = `http://localhost/users/33933a8d-32bb-c6a8-784a-f60b5a1dd66a/2021-12-12?objectId=83afbf49-5583-152c-d7fb-176105d518bc&startDate=2021-12-12&startTime=23%3A12%3A00.0000000&timeStamp=2024-06-11T00%3A00%3A00.000Z&duration=P1D&time=23:12:00.0000000`;
226+
const expected: string = `http://localhost/users/33933a8d-32bb-c6a8-784a-f60b5a1dd66a/2021-12-12?objectId=83afbf49-5583-152c-d7fb-176105d518bc&startDate=2021-12-12&startTime=23%3A12%3A00.0000000&timeStamp=2024-06-11T00%3A00%3A00.000Z&duration=P1D`;
227227
const requestInformation = new RequestInformation(HttpMethod.GET);
228228
requestInformation.pathParameters["baseurl"] = baseUrl;
229229
requestInformation.pathParameters["userId"] = parseGuidString("33933a8d-32bb-c6a8-784a-f60b5a1dd66a");
230230
requestInformation.pathParameters["date"] = DateOnly.parse("2021-12-12");
231231
requestInformation.urlTemplate = "http://localhost/users/{userId}/{date}{?objectId,startDate,startTime,endDate,endTime,timeStamp,duration}";
232-
requestInformation.setQueryStringParametersFromRawObject<GetQueryParameters>({ objectId: parseGuidString("83afbf49-5583-152c-d7fb-176105d518bc"), startDate: new DateOnly({ year: 2021, month: 12, day: 12 }), startTime: new TimeOnly({ hours: 23, minutes: 12 }), timeStamp: new Date("2024-06-11T00:00:00.000Z"), duration: Duration.parse("P1D"), time: TimeOnly.parse("23:12:00.0000000") }, getQueryParameterMapper);
232+
requestInformation.setQueryStringParametersFromRawObject<GetQueryParameters>({ objectId: parseGuidString("83afbf49-5583-152c-d7fb-176105d518bc"), startDate: new DateOnly({ year: 2021, month: 12, day: 12 }), startTime: new TimeOnly({ hours: 23, minutes: 12 }), timeStamp: new Date("2024-06-11T00:00:00.000Z"), duration: Duration.parse("P1D") }, getQueryParameterMapper);
233233
assert.equal(requestInformation.URL, expected);
234234
});
235235

0 commit comments

Comments
 (0)