1 Star 0 Fork 0

unsafe-rust/xorm

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
session_test.go 480 Bytes
一键复制 编辑 原始数据 按行查看 历史
lunny 提交于 2017-07-26 22:25 +08:00 . tests for close and add IsClosed() method (#659)
// Copyright 2017 The Xorm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package xorm
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestClose(t *testing.T) {
assert.NoError(t, prepareEngine())
sess1 := testEngine.NewSession()
sess1.Close()
assert.True(t, sess1.IsClosed())
sess2 := testEngine.Where("a = ?", 1)
sess2.Close()
assert.True(t, sess2.IsClosed())
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/unsafe-rust/xorm.git
git@gitee.com:unsafe-rust/xorm.git
unsafe-rust
xorm
xorm
v0.6.4

搜索帮助