@@ -189,8 +189,29 @@ func TestContactsUpdate_FromFile_CantCombineWithFlags(t *testing.T) {
189189 }
190190 _ = tmp .Close ()
191191
192+ // Previously covered: --email
192193 err = runKong (t , & ContactsUpdateCmd {}, []string {"people/c1" , "--from-file" , tmp .Name (), "--email" , "x@example.com" }, context .Background (), & RootFlags {Account : "a@b.com" })
193194 if err == nil || ! strings .Contains (err .Error (), "can't combine --from-file" ) {
194- t .Fatalf ("expected combine error, got %v" , err )
195+ t .Fatalf ("expected combine error for --email, got %v" , err )
196+ }
197+
198+ // Flags that were previously missing from the conflict guard: org, title, url, note, address, custom
199+ conflictCases := []struct {
200+ name string
201+ extra []string
202+ }{
203+ {"org" , []string {"--org" , "Acme" }},
204+ {"title" , []string {"--title" , "CEO" }},
205+ {"url" , []string {"--url" , "https://example.com" }},
206+ {"note" , []string {"--note" , "some note" }},
207+ {"address" , []string {"--address" , "123 Main St" }},
208+ {"custom" , []string {"--custom" , "key=value" }},
209+ }
210+ for _ , tc := range conflictCases {
211+ args := append ([]string {"people/c1" , "--from-file" , tmp .Name ()}, tc .extra ... )
212+ runErr := runKong (t , & ContactsUpdateCmd {}, args , context .Background (), & RootFlags {Account : "a@b.com" })
213+ if runErr == nil || ! strings .Contains (runErr .Error (), "can't combine --from-file" ) {
214+ t .Fatalf ("expected combine error for --%s, got %v" , tc .name , runErr )
215+ }
195216 }
196217}
0 commit comments