Beispiel #1
0
func (m *Mother) ReceiptsRepo() v1models.ReceiptsRepo {
	return v1models.NewReceiptsRepo()
}
import (
	"github.com/cloudfoundry-incubator/notifications/db"
	"github.com/cloudfoundry-incubator/notifications/testing/helpers"
	"github.com/cloudfoundry-incubator/notifications/v1/models"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Receipts Repo", func() {
	var repo models.ReceiptsRepo
	var conn *db.Connection

	BeforeEach(func() {
		repo = models.NewReceiptsRepo()

		database := db.NewDatabase(sqlDB, db.Config{})
		helpers.TruncateTables(database)

		conn = database.Connection().(*db.Connection)
	})

	Describe("CreateReceipts", func() {
		var (
			firstUserGUID  string
			secondUserGUID string
			userGUIDs      []string
			clientID       string
			kindID         string
		)