Skip to content

Commit

Permalink
update tests [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jan 22, 2020
1 parent c161c4e commit 3be8be5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cli/prisma2/src/__tests__/integrate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function tests() {
drop table if exists teams cascade;
`,
do: async client => {
return client.teams.findOne({ where: { id: 2 } })
return client.team.findOne({ where: { id: 2 } })
},
expect: {
id: 2,
Expand All @@ -160,7 +160,7 @@ function tests() {
drop table if exists teams cascade;
`,
do: async client => {
return client.teams.findOne({ where: { id: 2 }, select: { name: true } })
return client.team.findOne({ where: { id: 2 }, select: { name: true } })
},
expect: {
name: 'b',
Expand Down Expand Up @@ -189,7 +189,7 @@ function tests() {
drop table if exists users cascade;
`,
do: async client => {
return client.users.findOne({ where: { id: 1 }, include: { postses: true } })
return client.user.findOne({ where: { id: 1 }, include: { postses: true } })
},
expect: {
email: 'ada@prisma.io',
Expand Down Expand Up @@ -217,7 +217,7 @@ function tests() {
drop table if exists teams cascade;
`,
do: async client => {
return client.teams.create({ data: { name: 'c', id: 1 } })
return client.team.create({ data: { name: 'c', id: 1 } })
},
expect: {
id: 1,
Expand All @@ -236,7 +236,7 @@ function tests() {
drop table if exists teams cascade;
`,
do: async client => {
return client.teams.update({
return client.team.update({
where: { name: 'c' },
data: { name: 'd' },
})
Expand All @@ -258,7 +258,7 @@ function tests() {
drop table if exists users cascade;
`,
do: async client => {
return client.users.findOne({ where: { email: 'ada@prisma.io' } })
return client.user.findOne({ where: { email: 'ada@prisma.io' } })
},
expect: {
id: 1,
Expand All @@ -277,7 +277,7 @@ function tests() {
drop table if exists users cascade;
`,
do: async client => {
return client.users({ where: { email: 'ada@prisma.io' } })
return client.user({ where: { email: 'ada@prisma.io' } })
},
expect: [
{
Expand All @@ -300,7 +300,7 @@ function tests() {
drop table if exists users cascade;
`,
do: async client => {
return client.users()
return client.user()
},
expect: [
{
Expand Down Expand Up @@ -335,7 +335,7 @@ function tests() {
drop table if exists users cascade;
`,
do: async client => {
return client.users.findOne({ where: { email: 'ada@prisma.io' } }).postses()
return client.user.findOne({ where: { email: 'ada@prisma.io' } }).postses()
},
expect: [
{
Expand Down Expand Up @@ -363,7 +363,7 @@ function tests() {
drop table if exists posts cascade;
`,
do: async client => {
return client.posts.findMany({
return client.post.findMany({
where: {
title: { contains: 'A' },
published: true,
Expand Down Expand Up @@ -393,7 +393,7 @@ function tests() {
drop table if exists posts cascade;
`,
do: async client => {
return client.posts.findMany({
return client.post.findMany({
where: {
OR: [{ title: { contains: 'A' } }, { title: { contains: 'C' } }],
published: true,
Expand Down

0 comments on commit 3be8be5

Please sign in to comment.