Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Oct 6, 2023
1 parent 7e6afdf commit ddda9ac
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Tests/PostgRESTTests/BuildURLRequestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@
.contains(column: "name", value: ["is:online", "faction:red"])
},
TestCase(name: "test upsert not ignoring duplicates") { client in
client.from("users")
try await client.from("users")
.upsert(values: ["email": "johndoe@supabase.io"])
},
TestCase(name: "test upsert ignoring duplicates") { client in
client.from("users")
try await client.from("users")
.upsert(values: ["email": "johndoe@supabase.io"], ignoreDuplicates: true)
},
TestCase(name: "query with + character") { client in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
curl \
--request POST \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
"https://example.supabase.co/rpc/test_fcn"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
curl \
--request POST \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
--data "{\"KEY\":\"VALUE\"}" \
"https://example.supabase.co/rpc/test_fcn"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
curl \
--request POST \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
--data "{\"email\":\"johndoe@supabase.io\"}" \
"https://example.supabase.co/users"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
"https://example.supabase.co/users?email=like.%25@supabase.co&select=*"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
"https://example.supabase.co/todos?column=eq.Some%20value&column=neq.Some%20value&column=gt.Some%20value&column=gte.Some%20value&column=lt.Some%20value&column=lte.Some%20value&column=like.Some%20value&column=ilike.Some%20value&column=is.Some%20value&column=in.Some%20value&column=cs.Some%20value&column=cd.Some%20value&column=sl.Some%20value&column=sr.Some%20value&column=nxl.Some%20value&column=nxr.Some%20value&column=adj.Some%20value&column=ov.Some%20value&column=fts.Some%20value&column=plfts.Some%20value&column=phfts.Some%20value&column=wfts.Some%20value&select=*"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
"https://example.supabase.co/users?name=cs.%7Bis:online,faction:red%7D&select=*"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
"https://example.supabase.co/users?address=cs.%7B%22postcode%22:90210%7D&select=name"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl \
--header "Content-Type: application/json" \
--header "X-Client-Info: postgrest-swift/1.0.0" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
"https://example.supabase.co/todos?id=in.(1,2,3)&select=*"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
curl \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Prefer: resolution=ignore-duplicates,return=representation" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
--data "{\"email\":\"johndoe@supabase.io\"}" \
"https://example.supabase.co/users"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
curl \
--request POST \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Prefer: resolution=merge-duplicates,return=representation" \
--header "X-Client-Info: postgrest-swift/1.0.1" \
--data "{\"email\":\"johndoe@supabase.io\"}" \
"https://example.supabase.co/users"

0 comments on commit ddda9ac

Please sign in to comment.