Skip to content

Commit fde463d

Browse files
committed
Correct to tabs
1 parent 2274d2e commit fde463d

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

helpers_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestSimple(t *testing.T) {
2424
// _ = clean
2525

2626
db.Prepare(t, `
27-
// Comment can be placed based on SurrealQL syntax.
27+
// Comment can be placed based on SurrealQL syntax.
2828
2929
// Dummy entry for database write testing.
3030
CREATE x:x SET x = "X";
@@ -38,7 +38,7 @@ func TestSimple(t *testing.T) {
3838
// SurrealDB will generate a random ID for this entry.
3939
CREATE user SET name = "John";
4040
CREATE user SET name = "Johnny";
41-
`)
41+
`)
4242

4343
type User struct {
4444
Username string `json:"username,omitempty"`

unmarshal_test.go

+25-25
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestUnmarshal(t *testing.T) {
2121

2222
prep := func(t testing.TB, db *surrealtest.SurrealDBTest) {
2323
db.Prepare(t, `
24-
// Comment can be placed based on SurrealQL syntax.
24+
// Comment can be placed based on SurrealQL syntax.
2525
2626
// Dummy entry for database write testing
2727
CREATE x:x SET x = "X";
@@ -35,7 +35,7 @@ func TestUnmarshal(t *testing.T) {
3535
// SurrealDB will generate a random ID for this entry.
3636
CREATE user:john SET name = "John";
3737
CREATE user:johnny SET name = "Johnny";
38-
`)
38+
`)
3939
}
4040

4141
cases := map[string]struct {
@@ -86,9 +86,9 @@ func TestUnmarshal(t *testing.T) {
8686
interaction: func(db *surrealtest.SurrealDBTest) (interface{}, error) {
8787
return db.Query(
8888
`
89-
CREATE user:j SET name = "J";
90-
CREATE user:jo SET name = "Jo";
91-
`, nil)
89+
CREATE user:j SET name = "J";
90+
CREATE user:jo SET name = "Jo";
91+
`, nil)
9292
},
9393
wantData: []User{
9494
{
@@ -105,22 +105,22 @@ func TestUnmarshal(t *testing.T) {
105105
interaction: func(db *surrealtest.SurrealDBTest) (interface{}, error) {
106106
return db.Query(
107107
`
108-
CREATE user:j SET name = "J";
109-
CREATE user:j SET name = "J"; // conflict
110-
CREATE user SET name = "John";
111-
`, nil)
108+
CREATE user:j SET name = "J";
109+
CREATE user:j SET name = "J"; // conflict
110+
CREATE user SET name = "John";
111+
`, nil)
112112
},
113113
wantErrorMsg: "Database record `user:j` already exists",
114114
},
115115
"Transaction: success": {
116116
interaction: func(db *surrealtest.SurrealDBTest) (interface{}, error) {
117117
return db.Query(
118118
`
119-
BEGIN TRANSACTION;
120-
CREATE user:j SET name = "J";
121-
CREATE user:jo SET name = "Jo";
122-
COMMIT TRANSACTION;
123-
`, nil)
119+
BEGIN TRANSACTION;
120+
CREATE user:j SET name = "J";
121+
CREATE user:jo SET name = "Jo";
122+
COMMIT TRANSACTION;
123+
`, nil)
124124
},
125125
wantData: []User{
126126
{
@@ -137,24 +137,24 @@ func TestUnmarshal(t *testing.T) {
137137
interaction: func(db *surrealtest.SurrealDBTest) (interface{}, error) {
138138
return db.Query(
139139
`
140-
BEGIN TRANSACTION;
141-
CREATE user:j SET name = "J";
142-
CREATE user:j SET name = "J"; // conflict
143-
CREATE user SET name = "John";
144-
COMMIT TRANSACTION;
145-
`, nil)
140+
BEGIN TRANSACTION;
141+
CREATE user:j SET name = "J";
142+
CREATE user:j SET name = "J"; // conflict
143+
CREATE user SET name = "John";
144+
COMMIT TRANSACTION;
145+
`, nil)
146146
},
147147
wantErrorMsg: "Database record `user:j` already exists",
148148
},
149149
"Transaction: canceled": {
150150
interaction: func(db *surrealtest.SurrealDBTest) (interface{}, error) {
151151
return db.Query(
152152
`
153-
BEGIN TRANSACTION;
154-
CREATE user:j SET name = "J";
155-
CREATE user SET name = "John";
156-
CANCEL TRANSACTION;
157-
`, nil)
153+
BEGIN TRANSACTION;
154+
CREATE user:j SET name = "J";
155+
CREATE user SET name = "John";
156+
CANCEL TRANSACTION;
157+
`, nil)
158158
},
159159
wantErrorMsg: "cancelled transaction",
160160
},

0 commit comments

Comments
 (0)