surrealpatch/sql/rdwr_test.go

216 lines
5.2 KiB
Go
Raw Normal View History

2017-11-16 20:53:13 +00:00
// Code generated by https://github.com/abcum/tmpl
// Source file: auth.gen.go.tmpl
// DO NOT EDIT!
// Copyright © 2016 Abcum Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package sql
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestRdwr(t *testing.T) {
Convey("InfoStatement should rdwr correctly", t, func() {
s := &InfoStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, false)
2017-11-16 20:53:13 +00:00
})
Convey("IfStatement should rdwr correctly", t, func() {
2017-11-16 20:53:13 +00:00
s := &IfStatement{RW: true}
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("LetStatement should rdwr correctly", t, func() {
2017-11-16 20:53:13 +00:00
s := &LetStatement{RW: true}
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("ReturnStatement should rdwr correctly", t, func() {
2017-11-16 20:53:13 +00:00
s := &ReturnStatement{RW: true}
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("LiveStatement should rdwr correctly", t, func() {
s := &LiveStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("KillStatement should rdwr correctly", t, func() {
s := &KillStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("SelectStatement should rdwr correctly", t, func() {
2017-11-16 20:53:13 +00:00
s := &SelectStatement{RW: true}
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("CreateStatement should rdwr correctly", t, func() {
s := &CreateStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("UpdateStatement should rdwr correctly", t, func() {
s := &UpdateStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DeleteStatement should rdwr correctly", t, func() {
s := &DeleteStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RelateStatement should rdwr correctly", t, func() {
s := &RelateStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("InsertStatement should rdwr correctly", t, func() {
s := &InsertStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("UpsertStatement should rdwr correctly", t, func() {
s := &UpsertStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineNamespaceStatement should rdwr correctly", t, func() {
s := &DefineNamespaceStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveNamespaceStatement should rdwr correctly", t, func() {
s := &RemoveNamespaceStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineDatabaseStatement should rdwr correctly", t, func() {
s := &DefineDatabaseStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveDatabaseStatement should rdwr correctly", t, func() {
s := &RemoveDatabaseStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineLoginStatement should rdwr correctly", t, func() {
s := &DefineLoginStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveLoginStatement should rdwr correctly", t, func() {
s := &RemoveLoginStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineTokenStatement should rdwr correctly", t, func() {
s := &DefineTokenStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveTokenStatement should rdwr correctly", t, func() {
s := &RemoveTokenStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineScopeStatement should rdwr correctly", t, func() {
s := &DefineScopeStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveScopeStatement should rdwr correctly", t, func() {
s := &RemoveScopeStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineTableStatement should rdwr correctly", t, func() {
s := &DefineTableStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveTableStatement should rdwr correctly", t, func() {
s := &RemoveTableStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineEventStatement should rdwr correctly", t, func() {
s := &DefineEventStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveEventStatement should rdwr correctly", t, func() {
s := &RemoveEventStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineFieldStatement should rdwr correctly", t, func() {
s := &DefineFieldStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveFieldStatement should rdwr correctly", t, func() {
s := &RemoveFieldStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("DefineIndexStatement should rdwr correctly", t, func() {
s := &DefineIndexStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
Convey("RemoveIndexStatement should rdwr correctly", t, func() {
s := &RemoveIndexStatement{}
2017-11-16 20:53:13 +00:00
w := s.Writeable()
So(w, ShouldEqual, true)
})
}