@@ -19,7 +19,7 @@ func TestCreateAccountHandler(t *testing.T) {
1919 // Test
2020 accountV1 .Domain .ID = "123-controller-create-account"
2121 payload , _ := json .Marshal (accountV1 )
22- req , _ := http .NewRequest (http .MethodPost , accountController .RouteAccountPath , bytes .NewBuffer (payload ))
22+ req , _ := http .NewRequest (http .MethodPost , accountController .routeAccountPath , bytes .NewBuffer (payload ))
2323 response := executeRequest (req )
2424
2525 // Assert
@@ -37,7 +37,7 @@ func TestCreateAccountHandler(t *testing.T) {
3737 t .Run ("Should not create an account - invalid request" , func (t * testing.T ) {
3838 // Test
3939 payload := []byte ("" )
40- req , _ := http .NewRequest (http .MethodPost , accountController .RouteAccountPath , bytes .NewBuffer (payload ))
40+ req , _ := http .NewRequest (http .MethodPost , accountController .routeAccountPath , bytes .NewBuffer (payload ))
4141 response := executeRequest (req )
4242
4343 // Assert
@@ -51,7 +51,7 @@ func TestCreateAccountHandler(t *testing.T) {
5151
5252 // Test
5353 payload , _ := json .Marshal (accountV1 )
54- req , _ := http .NewRequest (http .MethodPost , accountController .RouteAccountPath , bytes .NewBuffer (payload ))
54+ req , _ := http .NewRequest (http .MethodPost , accountController .routeAccountPath , bytes .NewBuffer (payload ))
5555 response := executeRequest (req )
5656
5757 // Assert
@@ -68,7 +68,7 @@ func TestFetchAccountHandler(t *testing.T) {
6868
6969 // Test
7070 payload := []byte ("" )
71- req , _ := http .NewRequest (http .MethodGet , accountController .RouteAccountPath + "/" + accountV1 .Domain .ID + "/" + accountV1 .Environment , bytes .NewBuffer (payload ))
71+ req , _ := http .NewRequest (http .MethodGet , accountController .routeAccountPath + "/" + accountV1 .Domain .ID + "/" + accountV1 .Environment , bytes .NewBuffer (payload ))
7272 response := executeRequest (req )
7373
7474 // Assert
@@ -83,7 +83,7 @@ func TestFetchAccountHandler(t *testing.T) {
8383 t .Run ("Should not fetch an account by domain ID / environment - not found" , func (t * testing.T ) {
8484 // Test
8585 payload := []byte ("" )
86- req , _ := http .NewRequest (http .MethodGet , accountController .RouteAccountPath + "/not-found/default" , bytes .NewBuffer (payload ))
86+ req , _ := http .NewRequest (http .MethodGet , accountController .routeAccountPath + "/not-found/default" , bytes .NewBuffer (payload ))
8787 response := executeRequest (req )
8888
8989 // Assert
@@ -100,7 +100,7 @@ func TestFetchAccountHandler(t *testing.T) {
100100
101101 // Test
102102 payload := []byte ("" )
103- req , _ := http .NewRequest (http .MethodGet , accountController .RouteAccountPath + "/" + accountV1 .Domain .ID , bytes .NewBuffer (payload ))
103+ req , _ := http .NewRequest (http .MethodGet , accountController .routeAccountPath + "/" + accountV1 .Domain .ID , bytes .NewBuffer (payload ))
104104 response := executeRequest (req )
105105
106106 // Assert
@@ -115,7 +115,7 @@ func TestFetchAccountHandler(t *testing.T) {
115115 t .Run ("Should not fetch all accounts by domain ID - not found" , func (t * testing.T ) {
116116 // Test
117117 payload := []byte ("" )
118- req , _ := http .NewRequest (http .MethodGet , accountController .RouteAccountPath + "/not-found" , bytes .NewBuffer (payload ))
118+ req , _ := http .NewRequest (http .MethodGet , accountController .routeAccountPath + "/not-found" , bytes .NewBuffer (payload ))
119119 response := executeRequest (req )
120120
121121 // Assert
@@ -138,7 +138,7 @@ func TestUpdateAccountHandler(t *testing.T) {
138138
139139 // Test
140140 payload , _ := json .Marshal (accountV2 )
141- req , _ := http .NewRequest (http .MethodPut , accountController .RouteAccountPath , bytes .NewBuffer (payload ))
141+ req , _ := http .NewRequest (http .MethodPut , accountController .routeAccountPath , bytes .NewBuffer (payload ))
142142 response := executeRequest (req )
143143
144144 // Assert
@@ -164,7 +164,7 @@ func TestUpdateAccountHandler(t *testing.T) {
164164 accountRequest .Token = "new-token"
165165
166166 payload , _ := json .Marshal (accountRequest )
167- req , _ := http .NewRequest (http .MethodPut , accountController .RouteAccountPath , bytes .NewBuffer (payload ))
167+ req , _ := http .NewRequest (http .MethodPut , accountController .routeAccountPath , bytes .NewBuffer (payload ))
168168 response := executeRequest (req )
169169
170170 // Assert
@@ -185,7 +185,7 @@ func TestUpdateAccountHandler(t *testing.T) {
185185 t .Run ("Should not update an account - invalid request" , func (t * testing.T ) {
186186 // Test
187187 payload := []byte ("" )
188- req , _ := http .NewRequest (http .MethodPut , accountController .RouteAccountPath , bytes .NewBuffer (payload ))
188+ req , _ := http .NewRequest (http .MethodPut , accountController .routeAccountPath , bytes .NewBuffer (payload ))
189189 response := executeRequest (req )
190190
191191 // Assert
@@ -203,7 +203,7 @@ func TestUpdateAccountHandler(t *testing.T) {
203203
204204 // Test
205205 payload , _ := json .Marshal (accountV1 )
206- req , _ := http .NewRequest (http .MethodPut , accountController .RouteAccountPath , bytes .NewBuffer (payload ))
206+ req , _ := http .NewRequest (http .MethodPut , accountController .routeAccountPath , bytes .NewBuffer (payload ))
207207 response := executeRequest (req )
208208
209209 // Assert
@@ -219,7 +219,7 @@ func TestDeleteAccountHandler(t *testing.T) {
219219 accountController .CreateAccountHandler (givenAccountRequest (accountV1 ))
220220
221221 // Test
222- req , _ := http .NewRequest (http .MethodDelete , accountController .RouteAccountPath + "/" + accountV1 .Domain .ID + "/" + accountV1 .Environment , nil )
222+ req , _ := http .NewRequest (http .MethodDelete , accountController .routeAccountPath + "/" + accountV1 .Domain .ID + "/" + accountV1 .Environment , nil )
223223 response := executeRequest (req )
224224
225225 // Assert
@@ -228,7 +228,7 @@ func TestDeleteAccountHandler(t *testing.T) {
228228
229229 t .Run ("Should not delete an account by domain ID / environment - not found" , func (t * testing.T ) {
230230 // Test
231- req , _ := http .NewRequest (http .MethodDelete , accountController .RouteAccountPath + "/not-found/default" , nil )
231+ req , _ := http .NewRequest (http .MethodDelete , accountController .routeAccountPath + "/not-found/default" , nil )
232232 response := executeRequest (req )
233233
234234 // Assert
@@ -241,7 +241,7 @@ func TestDeleteAccountHandler(t *testing.T) {
241241
242242func givenAccountRequest (data model.Account ) (* httptest.ResponseRecorder , * http.Request ) {
243243 w := httptest .NewRecorder ()
244- r := httptest .NewRequest (http .MethodPost , accountController .RouteAccountPath , nil )
244+ r := httptest .NewRequest (http .MethodPost , accountController .routeAccountPath , nil )
245245
246246 // Encode the account request as JSON
247247 body , _ := json .Marshal (data )
0 commit comments