We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ef987a commit c8ae6faCopy full SHA for c8ae6fa
engine_table_test.go
@@ -0,0 +1,28 @@
1
+// Copyright 2018 The Xorm Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+package xorm
6
7
+import (
8
+ "testing"
9
10
+ "github.com/stretchr/testify/assert"
11
+)
12
13
+type MCC struct {
14
+ ID int64 `xorm:"pk 'id'"`
15
+ Code string `xorm:"'code'"`
16
+ Description string `xorm:"'description'"`
17
+}
18
19
+func (mcc *MCC) TableName() string {
20
+ return "mcc"
21
22
23
+func TestTableName1(t *testing.T) {
24
+ assert.NoError(t, prepareEngine())
25
26
+ assert.EqualValues(t, "mcc", testEngine.TableName(new(MCC)))
27
+ assert.EqualValues(t, "mcc", testEngine.TableName("mcc"))
28
0 commit comments