mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans, usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0. Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
34 lines
752 B
Go
34 lines
752 B
Go
package test
|
|
|
|
import (
|
|
"github.com/hanzoai/commerce/log"
|
|
"github.com/hanzoai/commerce/models/site"
|
|
|
|
. "github.com/hanzoai/commerce/util/test/ginkgo"
|
|
)
|
|
|
|
var _ = Describe("site", func() {
|
|
Context("New site", func() {
|
|
req := new(site.Site)
|
|
res := new(site.Site)
|
|
|
|
Before(func() {
|
|
req = site.Fake(db)
|
|
res = site.New(db)
|
|
|
|
// Create new site
|
|
log.JSON(req)
|
|
// TODO: Our netlify reseller access is outdated right now, so this test won't work
|
|
// cl.Post("/site", req, res)
|
|
log.JSON(res)
|
|
})
|
|
|
|
It("Should create new sites", func() {
|
|
Skip("netlify reseller access required/outdated right now")
|
|
Expect(res.Domain).To(Equal(req.Domain))
|
|
Expect(res.Name).To(Equal(req.Name))
|
|
Expect(res.Url).To(Equal(req.Url))
|
|
})
|
|
})
|
|
})
|