flamingo.me/flamingo-commerce/v3@v3.11.0/test/integrationtest/moduletest/checkout_test.go (about) 1 //go:build integration 2 // +build integration 3 4 package moduletest 5 6 import ( 7 "net/http" 8 "testing" 9 10 "flamingo.me/dingo" 11 "flamingo.me/flamingo/v3/core/auth" 12 "flamingo.me/flamingo/v3/core/auth/fake" 13 14 "flamingo.me/flamingo/v3/framework/config" 15 16 "flamingo.me/flamingo-commerce/v3/checkout" 17 "flamingo.me/flamingo-commerce/v3/test/integrationtest" 18 ) 19 20 func Test_CheckoutStartPage(t *testing.T) { 21 info := integrationtest.Bootup( 22 []dingo.Module{ 23 new(auth.WebModule), 24 new(fake.Module), 25 new(checkout.Module), 26 }, 27 "", 28 config.Map{ 29 "flamingo.systemendpoint.serviceAddr": ":0", 30 "commerce.product.fakeservice.enabled": true, 31 "commerce.cart.emailAdapter.emailAddress": "test@test.de", 32 "commerce.customer.useNilCustomerAdapter": true, 33 "core.auth.web": config.Map{ 34 "debugController": true, 35 "broker": config.Slice{ 36 config.Map{ 37 "broker": "fake", 38 "typ": "fake", 39 "userConfig.username.password": "password", 40 "validatePassword": true, 41 "usernameFieldId": "username", 42 "passwordFieldId": "password", 43 }, 44 }, 45 }, 46 }, 47 ) 48 defer info.ShutdownFunc() 49 50 e := integrationtest.NewHTTPExpect(t, "http://"+info.BaseURL) 51 e.GET("/checkout/start"). 52 Expect(). 53 Status(http.StatusOK).JSON().Object().Value("CustomerLoggedIn").Equal(false) 54 55 }