mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Fixed unit test
This commit is contained in:
@@ -43,7 +43,7 @@ export class NotFoundError extends BackendError {
|
||||
|
||||
export function createBackendError(content: BackendErrorContent, statusCode: number) {
|
||||
switch (statusCode) {
|
||||
case 403:
|
||||
case 401:
|
||||
return new UnauthorizedError(content, statusCode);
|
||||
case 404:
|
||||
return new NotFoundError(content, statusCode);
|
||||
|
||||
@@ -688,10 +688,6 @@
|
||||
react "^16.4.2"
|
||||
react-dom "^16.4.2"
|
||||
|
||||
"@scm-manager/ui-types@2.0.0-SNAPSHOT":
|
||||
version "2.0.0-20181010-130547"
|
||||
resolved "https://registry.yarnpkg.com/@scm-manager/ui-types/-/ui-types-2.0.0-20181010-130547.tgz#9987b519e43d5c4b895327d012d3fd72429a7953"
|
||||
|
||||
"@types/node@*":
|
||||
version "10.12.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.0.tgz#ea6dcbddbc5b584c83f06c60e82736d8fbb0c235"
|
||||
|
||||
@@ -180,8 +180,15 @@ describe("auth actions", () => {
|
||||
|
||||
it("should dispatch fetch me unauthorized", () => {
|
||||
fetchMock.getOnce("/api/v2/me", {
|
||||
status: 401
|
||||
});
|
||||
status: 401,
|
||||
headers: {
|
||||
"content-type": "application/vnd.scmm-error+json;v=2"
|
||||
},
|
||||
body: {
|
||||
transactionId: "123",
|
||||
message: "So nicht Freundchen",
|
||||
context: {}
|
||||
}});
|
||||
|
||||
const expectedActions = [
|
||||
{ type: FETCH_ME_PENDING },
|
||||
|
||||
Reference in New Issue
Block a user