Use Me-type

This commit is contained in:
Philipp Czora
2018-07-24 17:05:38 +02:00
parent 181a9e9786
commit b5f64429d4
6 changed files with 23 additions and 15 deletions

View File

@@ -166,13 +166,16 @@ describe("auth actions", () => {
it("should dispatch fetch me success", () => {
fetchMock.getOnce("/scm/api/rest/v2/me", {
body: { username: "sorbot" },
body: { name: "sorbot", displayName: "Sorbot" },
headers: { "content-type": "application/json" }
});
const expectedActions = [
{ type: FETCH_ME_REQUEST },
{ type: FETCH_ME_SUCCESS, payload: { username: "sorbot" } }
{
type: FETCH_ME_SUCCESS,
payload: { userName: "sorbot", displayName: "Sorbot" }
}
];
const store = mockStore({});