Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/http/controllers/orgs/getAdoptionsHistory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ describe('Adoptions History Org Controller', () => {
beforeAll(async () => {
await app.ready()

// Cria org
const password_hash = await hash('123456', 6)
const org = await prisma.org.create({
data: {
Expand All @@ -30,14 +29,12 @@ describe('Adoptions History Org Controller', () => {
},
})

// Autentica org
const authResponse = await request(app.server).post('/org/sessions').send({
email: 'ongadote@email.com',
password: '123456',
})
token = authResponse.body.token

// Cria usuário
const user_password_hash = await hash('654321', 6)
const user = await prisma.user.create({
data: {
Expand All @@ -48,7 +45,6 @@ describe('Adoptions History Org Controller', () => {
},
})

// Cria pet
const pet = await prisma.pet.create({
data: {
name: 'Rex',
Expand All @@ -61,7 +57,6 @@ describe('Adoptions History Org Controller', () => {
},
})

// Marca adoção
await prisma.adoptions.create({
data: {
user_id: user.id,
Expand Down