]> git.r.bdr.sh - rbdr/forum/blobdiff - src/stores/posts.test.js
Add topics store pact tests
[rbdr/forum] / src / stores / posts.test.js
index acd843c8400f620c39927d1aeeedf120a44d1968..5d1fc05f9d73543b0b5f3e2ad57dea2ab0244ee4 100644 (file)
@@ -3,7 +3,7 @@ import { resolve } from 'path';
 
 import { resolveAfter } from '$/utils/resolve_after';
 
-const { eachLike, like } = Matchers;
+const { like } = Matchers;
 
 jest.mock('$/config/config.js');
 
@@ -66,7 +66,7 @@ describe('Posts store pact', () => {
             }`
           )
           .withVariables({
-            id: 'freezer'
+            id: '8f75eba5-6989-4dd3-b466-e464546ce374'
           })
           .willRespondWith({
             status: 200,
@@ -96,7 +96,7 @@ describe('Posts store pact', () => {
 
       test('it returns the post', async () => {
 
-        const post = getPost('freezer');
+        const post = getPost('8f75eba5-6989-4dd3-b466-e464546ce374');
         const { counter, promise: resolveAfterTwo } = resolveAfter(2);
         let response = null;
         post.subscribe((postValue) => {
@@ -162,7 +162,7 @@ describe('Posts store pact', () => {
             }`
           )
           .withVariables({
-            id: 'freezer'
+            id: '8f75eba5-6989-4dd3-b466-e464546ce374'
           })
           .willRespondWith({
             status: 200,
@@ -180,7 +180,7 @@ describe('Posts store pact', () => {
 
       test('it returns the post', async () => {
 
-        const post = getPost('freezer');
+        const post = getPost('8f75eba5-6989-4dd3-b466-e464546ce374');
         const { counter, promise: resolveAfterTwo } = resolveAfter(2);
         let response = null;
         post.subscribe((postValue) => {
@@ -234,7 +234,7 @@ describe('Posts store pact', () => {
             }`
           )
           .withVariables({
-            id: 'freezer'
+            id: '8f75eba5-6989-4dd3-b466-e464546ce374'
           })
           .willRespondWith({
             status: 500
@@ -244,7 +244,7 @@ describe('Posts store pact', () => {
 
       test('it returns the error', async () => {
 
-        const post = getPost('freezer');
+        const post = getPost('8f75eba5-6989-4dd3-b466-e464546ce374');
         const { counter, promise: resolveAfterTwo } = resolveAfter(2);
         let response = null;
         post.subscribe((postValue) => {