]> git.r.bdr.sh - rbdr/forum/blobdiff - src/stores/forums.test.js
Add topics store pact tests
[rbdr/forum] / src / stores / forums.test.js
index e117828dddc1d1dcded15ae77db16ca459776332..eb4bc071bf77d930127fa5d2e2ee760815466d2d 100644 (file)
@@ -20,8 +20,9 @@ describe('Forums store pact', () => {
     internals.provider = new Pact({
       port: 1234,
       dir: resolve(process.cwd(), 'pacts'),
     internals.provider = new Pact({
       port: 1234,
       dir: resolve(process.cwd(), 'pacts'),
-      consumer: 'ForumsStore',
-      provider: 'ForumAPIServer'
+      consumer: 'ForumClient',
+      provider: 'ForumServer',
+      pactfileWriteMode: 'update'
     });
 
     await internals.provider.setup();
     });
 
     await internals.provider.setup();
@@ -30,14 +31,14 @@ describe('Forums store pact', () => {
   afterEach(() => internals.provider.verify());
   afterAll(() => internals.provider.finalize());
 
   afterEach(() => internals.provider.verify());
   afterAll(() => internals.provider.finalize());
 
-  describe('When there\'s forums', () => {
+  describe('When there\'s data', () => {
 
     describe('GetForums', () => {
 
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
 
     describe('GetForums', () => {
 
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
-          .given('there\'s forums')
+          .given('there\'s data')
           .uponReceiving('a request to list the forums')
           .withRequest({
             path: '/graphql',
           .uponReceiving('a request to list the forums')
           .withRequest({
             path: '/graphql',
@@ -106,7 +107,7 @@ describe('Forums store pact', () => {
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
-          .given('there\'s forums')
+          .given('there\'s data')
           .uponReceiving('a request to get a single forum')
           .withRequest({
             path: '/graphql',
           .uponReceiving('a request to get a single forum')
           .withRequest({
             path: '/graphql',
@@ -189,14 +190,14 @@ describe('Forums store pact', () => {
     });
   });
 
     });
   });
 
-  describe('When there\'s no forums', () => {
+  describe('When there\'s no data', () => {
 
     describe('GetForums', () => {
 
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
 
     describe('GetForums', () => {
 
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
-          .given('there\'s no forums')
+          .given('there\'s no data')
           .uponReceiving('a request to list the forums')
           .withRequest({
             path: '/graphql',
           .uponReceiving('a request to list the forums')
           .withRequest({
             path: '/graphql',
@@ -256,7 +257,7 @@ describe('Forums store pact', () => {
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
       beforeAll(async () => {
 
         const forumQuery = new GraphQLInteraction()
-          .given('there\'s no forums')
+          .given('there\'s no data')
           .uponReceiving('a request to get a single forum')
           .withRequest({
             path: '/graphql',
           .uponReceiving('a request to get a single forum')
           .withRequest({
             path: '/graphql',