You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nos pide crear una película mediante la API y que exista en la base de datos.
No sabemos como recuperar la película como para compararla.
test('Crear película por API', async () => {
const movieData = {
title: 'Back to the Future',
description: 'Marty McFly, a 17-year-old high school student, is accidentally sent thirty years into the past in a time-traveling DeLorean invented by his close friend, the maverick scientist Doc Brown.',
year: 1985,
runtime: 116,
country: 'United States',
language: 'English',
genres: ['Adventure', 'Comedy', 'Science Fiction'],
directors: ['Robert Zemeckis'],
writers: ['Robert Zemeckis', 'Bob Gale']
};
const URL = ${baseURL}/movies;
const req = await fetch(URL)
await fetch(URL, {
method: 'POST',
body: JSON.stringify(movieData),
headers: { 'Content-Type': 'application/json' },
})
const recivedMovie = await MovieModels.get(1);
expect(recivedMovie.title).toBe('Back to the Future');
// Completar test
});
The text was updated successfully, but these errors were encountered:
Nos pide crear una película mediante la API y que exista en la base de datos.
No sabemos como recuperar la película como para compararla.
test('Crear película por API', async () => {
const movieData = {
title: 'Back to the Future',
description: 'Marty McFly, a 17-year-old high school student, is accidentally sent thirty years into the past in a time-traveling DeLorean invented by his close friend, the maverick scientist Doc Brown.',
year: 1985,
runtime: 116,
country: 'United States',
language: 'English',
genres: ['Adventure', 'Comedy', 'Science Fiction'],
directors: ['Robert Zemeckis'],
writers: ['Robert Zemeckis', 'Bob Gale']
};
const URL =
${baseURL}/movies
;const req = await fetch(URL)
await fetch(URL, {
method: 'POST',
body: JSON.stringify(movieData),
headers: { 'Content-Type': 'application/json' },
})
});
The text was updated successfully, but these errors were encountered: