summaryrefslogtreecommitdiffstats
path: root/models/setup_for_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/setup_for_test.go')
-rw-r--r--models/setup_for_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/setup_for_test.go b/models/setup_for_test.go
index 7d21768945..e6f86ec685 100644
--- a/models/setup_for_test.go
+++ b/models/setup_for_test.go
@@ -59,10 +59,11 @@ func loadBeanIfExists(bean interface{}, conditions ...interface{}) (bool, error)
// AssertExistsAndLoadBean assert that a bean exists and load it from the test
// database
-func AssertExistsAndLoadBean(t *testing.T, bean interface{}, conditions ...interface{}) {
+func AssertExistsAndLoadBean(t *testing.T, bean interface{}, conditions ...interface{}) interface{} {
exists, err := loadBeanIfExists(bean, conditions...)
assert.NoError(t, err)
assert.True(t, exists)
+ return bean
}
// AssertNotExistsBean assert that a bean does not exist in the test database