fix tests

This commit is contained in:
Maren Süwer
2019-01-22 13:09:06 +01:00
parent 0a7dca0be3
commit 2494daebd4

View File

@@ -415,9 +415,14 @@ describe("repos fetch", () => {
it("should successfully create repo slarti/fjords", () => {
fetchMock.postOnce(REPOS_URL, {
status: 201
status: 201,
headers: {
location: "repositories/slarti/fjords"
}
});
fetchMock.getOnce(REPOS_URL + "/slarti/fjords", slartiFjords);
const expectedActions = [
{
type: CREATE_REPO_PENDING
@@ -435,9 +440,14 @@ describe("repos fetch", () => {
it("should successfully create repo slarti/fjords and call the callback", () => {
fetchMock.postOnce(REPOS_URL, {
status: 201
status: 201,
headers: {
location: "repositories/slarti/fjords"
}
});
fetchMock.getOnce(REPOS_URL + "/slarti/fjords", slartiFjords);
let callMe = "not yet";
const callback = () => {