66 "strings"
77 "testing"
88
9- "github.com/envelope-zero/backend/v2 /pkg/controllers"
10- "github.com/envelope-zero/backend/v2 /pkg/models"
11- "github.com/envelope-zero/backend/v2 /test"
9+ "github.com/envelope-zero/backend/v3 /pkg/controllers"
10+ "github.com/envelope-zero/backend/v3 /pkg/models"
11+ "github.com/envelope-zero/backend/v3 /test"
1212 "github.com/google/uuid"
1313 "github.com/stretchr/testify/assert"
1414)
@@ -48,13 +48,13 @@ func (suite *TestSuiteStandard) TestOptionsAccount() {
4848 recorder = test .Request (suite .controller , suite .T (), http .MethodOptions , "http://example.com/v1/accounts/NotParseableAsUUID" , "" )
4949 assert .Equal (suite .T (), http .StatusBadRequest , recorder .Code , "Request ID %s" , recorder .Header ().Get ("x-request-id" ))
5050
51- path = suite .createTestAccount (models.AccountCreate {}).Data .Links .Self
51+ path = suite .createTestAccount (models.AccountCreate {Name : "TestOptionsAccount" }).Data .Links .Self
5252 recorder = test .Request (suite .controller , suite .T (), http .MethodOptions , path , "" )
5353 assert .Equal (suite .T (), http .StatusNoContent , recorder .Code , "Request ID %s" , recorder .Header ().Get ("x-request-id" ))
5454}
5555
5656func (suite * TestSuiteStandard ) TestGetAccounts () {
57- _ = suite .createTestAccount (models.AccountCreate {})
57+ _ = suite .createTestAccount (models.AccountCreate {Name : "TestGetAccounts" })
5858
5959 var response controllers.AccountListResponse
6060 recorder := test .Request (suite .controller , suite .T (), http .MethodGet , "http://example.com/v1/accounts" , "" )
@@ -200,7 +200,7 @@ func (suite *TestSuiteStandard) TestAccountInvalidIDs() {
200200}
201201
202202func (suite * TestSuiteStandard ) TestCreateAccount () {
203- _ = suite .createTestAccount (models.AccountCreate {Name : "Test account for creation " })
203+ _ = suite .createTestAccount (models.AccountCreate {Name : "TestCreateAccount " })
204204}
205205
206206func (suite * TestSuiteStandard ) TestCreateAccountNoBudget () {
@@ -235,7 +235,7 @@ func (suite *TestSuiteStandard) TestCreateAccountNoBody() {
235235}
236236
237237func (suite * TestSuiteStandard ) TestGetAccount () {
238- a := suite .createTestAccount (models.AccountCreate {})
238+ a := suite .createTestAccount (models.AccountCreate {Name : "TestGetAccount" })
239239
240240 r := test .Request (suite .controller , suite .T (), http .MethodGet , a .Data .Links .Self , "" )
241241 assert .Equal (suite .T (), http .StatusOK , r .Code )
@@ -266,7 +266,7 @@ func (suite *TestSuiteStandard) TestUpdateAccount() {
266266
267267func (suite * TestSuiteStandard ) TestUpdateAccountBrokenJSON () {
268268 a := suite .createTestAccount (models.AccountCreate {
269- Name : "New Account " ,
269+ Name : "TestUpdateAccountBrokenJSON " ,
270270 Note : "More tests something something" ,
271271 })
272272
@@ -276,7 +276,7 @@ func (suite *TestSuiteStandard) TestUpdateAccountBrokenJSON() {
276276
277277func (suite * TestSuiteStandard ) TestUpdateAccountInvalidType () {
278278 a := suite .createTestAccount (models.AccountCreate {
279- Name : "New Account " ,
279+ Name : "TestUpdateAccountInvalidType " ,
280280 Note : "More tests something something" ,
281281 })
282282
@@ -288,7 +288,7 @@ func (suite *TestSuiteStandard) TestUpdateAccountInvalidType() {
288288
289289func (suite * TestSuiteStandard ) TestUpdateAccountInvalidBudgetID () {
290290 a := suite .createTestAccount (models.AccountCreate {
291- Name : "New Account " ,
291+ Name : "TestUpdateAccountInvalidBudgetID " ,
292292 Note : "More tests something something" ,
293293 })
294294
@@ -327,7 +327,7 @@ func (suite *TestSuiteStandard) TestDeleteNonExistingAccount() {
327327}
328328
329329func (suite * TestSuiteStandard ) TestDeleteAccountWithBody () {
330- a := suite .createTestAccount (models.AccountCreate {Name : "Delete me now! " })
330+ a := suite .createTestAccount (models.AccountCreate {Name : "TestDeleteAccountWithBody " })
331331
332332 r := test .Request (suite .controller , suite .T (), http .MethodDelete , a .Data .Links .Self , models.AccountCreate {Name : "Some other account" })
333333 assertHTTPStatus (suite .T (), & r , http .StatusNoContent )
0 commit comments