Improve Page structure and create a redirect middleware to set /films as homepage

This commit is contained in:
2020-12-17 18:28:32 +01:00
parent 467eb68e25
commit 407ef3dcd1
4 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import { mount } from "@vue/test-utils";
import axios from "axios";
import FilmsView from "@/pages";
import FilmsView from "@/pages/films";
import mockFilms from "./fake-films.json";
jest.mock("axios", () => ({
@@ -10,7 +10,7 @@ jest.mock("axios", () => ({
describe("Films page", () => {
it("should render Films page instance", () => {
const wrapper = mount(FilmsView);
expect(wrapper.find("h1").text()).toBe("Ghibli films");
expect(wrapper.find("h2").text()).toBe("Ghibli films");
});
it("should get films from Ghibli API", async () => {