MCPcopy
hub / github.com/digitalocean/doctl / TestProjectsUpdateSomeAttributes

Function TestProjectsUpdateSomeAttributes

commands/projects_test.go:117–136  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

115}
116
117func TestProjectsUpdateSomeAttributes(t *testing.T) {
118 withTestClient(t, func(config *CmdConfig, tm *tcMocks) {
119 projectUUID := "ab06e011-6dd1-4034-9293-201f71aba299"
120 updateReq := &godo.UpdateProjectRequest{
121 Name: "project name",
122 Description: "project description",
123 Purpose: nil,
124 Environment: nil,
125 IsDefault: nil,
126 }
127 tm.projects.EXPECT().Update(projectUUID, updateReq).Return(&testProject, nil)
128
129 config.Args = append(config.Args, projectUUID)
130 config.Doit.Set(config.NS, doctl.ArgProjectName, "project name")
131 config.Doit.Set(config.NS, doctl.ArgProjectDescription, "project description")
132
133 err := RunProjectsUpdate(config)
134 assert.NoError(t, err)
135 })
136}
137
138func TestProjectsUpdateOneAttribute(t *testing.T) {
139 withTestClient(t, func(config *CmdConfig, tm *tcMocks) {

Callers

nothing calls this directly

Calls 5

withTestClientFunction · 0.85
RunProjectsUpdateFunction · 0.85
UpdateMethod · 0.65
SetMethod · 0.65
EXPECTMethod · 0.45

Tested by

no test coverage detected