// Copyright 2014 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packagemodelsimport("fmt""testing""github.com/lunny/xorm"_"github.com/mattn/go-sqlite3")funcinit(){varerrerrororm,err=xorm.NewEngine("sqlite3","./test.db")iferr!=nil{fmt.Println(err)}orm.ShowSQL=trueorm.ShowDebug=trueerr=orm.Sync(&User{},&Repo{})iferr!=nil{fmt.Println(err)}root="test"}funcTestCreateRepository(t*testing.T){user:=User{Id:1,Type:Individual}_,err:=CreateRepository(&user,"test")iferr!=nil{t.Error(err)}}funcTestDeleteRepository(t*testing.T){user:=User{Id:1,Type:Individual}err:=DeleteRepository(&user,"test")iferr!=nil{t.Error(err)}}