Documentation ¶
Index ¶
- func MockUserItemStorage() *mongoDB.UserItemStorage
- func MockUserSubmissionData() *models.UserSubmission
- type ItemInfoTest
- type UserInfoResponse
- type UserInfoTest
- func (t *UserInfoTest) After()
- func (t *UserInfoTest) Before()
- func (t *UserInfoTest) TestIfAddUserInfoToMapChangesInfo()
- func (t *UserInfoTest) TestIfDatabaseDocumentExistsAfterPOST()
- func (t *UserInfoTest) TestIfPOSTuserinfoSucceeded()
- func (t *UserInfoTest) TestQuickSortUserProfits()
- func (t *UserInfoTest) TestifGETuserinfoSucceeded()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockUserItemStorage ¶
func MockUserItemStorage() *mongoDB.UserItemStorage
MockUserItemStorage mocks a user's storage in the database
func MockUserSubmissionData ¶
func MockUserSubmissionData() *models.UserSubmission
MockUserSubmissionData mocks a Payload to the POST /userinfo/ endpoint
Types ¶
type ItemInfoTest ¶
ItemInfoTest is the testing suite for ItemInfo
func (*ItemInfoTest) TestIfWebsiteurlCreatesValidURL ¶
func (t *ItemInfoTest) TestIfWebsiteurlCreatesValidURL()
TestIfWebsiteurlCreatesValidURL checks if we're actually creating the correct URL.
func (*ItemInfoTest) TestIfXIVAPIItemEndpointExists ¶
func (t *ItemInfoTest) TestIfXIVAPIItemEndpointExists()
TestIfXIVAPIItemEndpointExists checks if our Item endpoint is still valid.
func (*ItemInfoTest) TestIfXIVAPIRecipeEndpointExists ¶
func (t *ItemInfoTest) TestIfXIVAPIRecipeEndpointExists()
TestIfXIVAPIRecipeEndpointExists checks if our Recipe endpoint is still valid.
type UserInfoResponse ¶
type UserInfoResponse struct { UserPrices map[string]models.UserPrices `json:"UserPrices"` UserProfits map[string]models.UserProfits `json:"UserProfits"` }
UserInfoResponse is a placeholder to unmarshal the response from /userinfo/Test/recipe/:recipeID
type UserInfoTest ¶
UserInfoTest is a testing Suite for UserInfo
func (*UserInfoTest) Before ¶
func (t *UserInfoTest) Before()
Before initializes before our tests runs.
func (*UserInfoTest) TestIfAddUserInfoToMapChangesInfo ¶
func (t *UserInfoTest) TestIfAddUserInfoToMapChangesInfo()
TestIfAddUserInfoToMapChangesInfo checks if we are editing our user's storage.
func (*UserInfoTest) TestIfDatabaseDocumentExistsAfterPOST ¶
func (t *UserInfoTest) TestIfDatabaseDocumentExistsAfterPOST()
TestIfDatabaseDocumentExistsAfterPOST checks if we can obtain data from the database after posting data
func (*UserInfoTest) TestIfPOSTuserinfoSucceeded ¶
func (t *UserInfoTest) TestIfPOSTuserinfoSucceeded()
TestIfPOSTuserinfoSucceeded checks if we can send a proper POST request to the backend server
func (*UserInfoTest) TestQuickSortUserProfits ¶
func (t *UserInfoTest) TestQuickSortUserProfits()
TestQuickSortUserProfits actually sorts our response in descending order.
func (*UserInfoTest) TestifGETuserinfoSucceeded ¶
func (t *UserInfoTest) TestifGETuserinfoSucceeded()
TestifGETuserinfoSucceeded checks if we can send a GET request to the backend server for a user info