Skip to content

Commit

Permalink
fix incorrect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abalabahaha committed Sep 1, 2022
1 parent d7c2e2d commit 60da980
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions test/unit/schema-builder/postgres.js
Expand Up @@ -886,7 +886,7 @@ describe('PostgreSQL SchemaBuilder', function () {
.table('users', function (table) {
table.unique('foo', {
indexName: 'bar',
useConstraint: true,
useConstraint: false,
});
})
.toSQL();
Expand Down Expand Up @@ -1045,23 +1045,6 @@ describe('PostgreSQL SchemaBuilder', function () {
);
});

it('adding unique index with an index type and a predicate', function () {
tableSql = client
.schemaBuilder()
.table('users', function (table) {
table.unique(['foo', 'bar'], {
indexName: 'baz',
indexType: 'gist',
predicate: client.queryBuilder().whereRaw('email = "foo@bar"'),
});
})
.toSQL();
equal(1, tableSql.length);
expect(tableSql[0].sql).to.equal(
'create unique index "baz" on "users" using gist ("foo", "bar") where email = "foo@bar"'
);
});

it('adding unique index with a where not null predicate', function () {
tableSql = client
.schemaBuilder()
Expand Down

0 comments on commit 60da980

Please sign in to comment.