Skip to content

Commit

Permalink
fix test file bug
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Sep 28, 2021
1 parent d3073be commit 11cf6ff
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
26 changes: 26 additions & 0 deletions global/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/yaoapp/xiang/table"
)

func TestLoad(t *testing.T) {
Expand Down Expand Up @@ -44,3 +45,28 @@ func TestLoadAppFS(t *testing.T) {
})
})
}

func TestTableLoad(t *testing.T) {

table, has := table.Tables["service"]
assert.Equal(t, table.Table, "service")
assert.True(t, has)

_, has = table.Columns["id"]
assert.True(t, has)

price, has := table.Columns["计费方式"]
assert.True(t, has)
if has {
assert.True(t, price.Edit.Props["multiple"].(bool))
}

_, has = table.Filters["id"]
assert.True(t, has)

keywords, has := table.Filters["关键词"]
assert.True(t, has)
if has {
assert.True(t, keywords.Bind == "where.name.like")
}
}
32 changes: 0 additions & 32 deletions table/table_test.go

This file was deleted.

0 comments on commit 11cf6ff

Please sign in to comment.