Documentation ¶
Index ¶
Constants ¶
const CreateRequest = `
{
"project": {
"description": "The team that is red",
"name": "Red Team"
}
}
`
CreateRequest provides the input to a Create request.
const GetOutput = `` /* 190-byte string literal not displayed */
GetOutput provides a Get result.
const ListOutput = `` /* 497-byte string literal not displayed */
ListOutput provides a single page of Project results.
const UpdateOutput = `` /* 204-byte string literal not displayed */
UpdateOutput provides an Update response.
const UpdateRequest = `
{
"project": {
"description": "The team that is bright red",
"name": "Bright Red Team"
}
}
`
UpdateRequest provides the input to an Update request.
Variables ¶
var BlueTeam = projects.Project{ IsDomain: false, Description: "The team that is blue", DomainID: "default", Enabled: true, ID: "9876", Name: "Blue Team", ParentID: "", }
BlueTeam is a Project fixture.
var ExpectedProjectSlice = []projects.Project{RedTeam, BlueTeam}
ExpectedProjectSlice is the slice of projects expected to be returned from ListOutput.
var RedTeam = projects.Project{ IsDomain: false, Description: "The team that is red", DomainID: "default", Enabled: true, ID: "1234", Name: "Red Team", ParentID: "", }
RedTeam is a Project fixture.
var UpdatedRedTeam = projects.Project{ IsDomain: false, Description: "The team that is bright red", DomainID: "default", Enabled: true, ID: "1234", Name: "Bright Red Team", ParentID: "", }
UpdatedRedTeam is a Project Fixture.
Functions ¶
func HandleCreateProjectSuccessfully ¶
HandleCreateProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project creation.
func HandleDeleteProjectSuccessfully ¶
HandleDeleteProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project deletion.
func HandleGetProjectSuccessfully ¶
HandleGetProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that responds with a single project.
func HandleListProjectsSuccessfully ¶
HandleListProjectsSuccessfully creates an HTTP handler at `/projects` on the test handler mux that responds with a list of two tenants.
func HandleUpdateProjectSuccessfully ¶
HandleUpdateProjectSuccessfully creates an HTTP handler at `/projects` on the test handler mux that tests project updates.
Types ¶
This section is empty.