Skip to content

Commit

Permalink
Get rid of different factory files
Browse files Browse the repository at this point in the history
..and fix some cypress tests
  • Loading branch information
roschaefer committed Jan 28, 2020
1 parent 2fc71d7 commit fc36729
Show file tree
Hide file tree
Showing 50 changed files with 728 additions and 965 deletions.
7 changes: 3 additions & 4 deletions backend/src/activitypub/routes/webfinger.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { handler } from './webfinger'
import Factory from '../../factories'
import Factory, { cleanDatabase } from '../../factories'
import { getDriver } from '../../db/neo4j'

let resource, res, json, status, contentType

const factory = Factory()
const driver = getDriver()

const request = () => {
Expand All @@ -28,7 +27,7 @@ const request = () => {
}

afterEach(async () => {
await factory.cleanDatabase()
await cleanDatabase()
})

describe('webfinger', () => {
Expand Down Expand Up @@ -90,7 +89,7 @@ describe('webfinger', () => {

describe('given a user for acct', () => {
beforeEach(async () => {
await factory.create('User', { slug: 'some-user' })
await Factory.build('user', { slug: 'some-user' })
})

it('returns user object', async () => {
Expand Down
Loading

0 comments on commit fc36729

Please sign in to comment.