main
Lynn Cyrin 4 years ago
parent 1651eec7b8
commit 9eb7426ac3
No known key found for this signature in database
GPG Key ID: 9E60BEE0555C367B

@ -370,11 +370,35 @@ func TestContextAttributeAccessing(t *testing.T) {
newContextInput: nil,
},
{
testCase: "empty_set_bool_and_present_ctx_bool_with_background_context",
testCase: "present_set_bool_and_present_ctx_bool_with_background_context",
setBoolInput: "",
ctxBoolInput: "ctx-bool",
newContextInput: &Context{Context: context.Background()},
},
{
testCase: "present_set_bool_and_present_ctx_bool",
setBoolInput: "ctx-bool",
ctxBoolInput: "ctx-bool",
newContextInput: nil,
},
{
testCase: "present_set_bool_and_present_ctx_bool_with_background_context",
setBoolInput: "ctx-bool",
ctxBoolInput: "ctx-bool",
newContextInput: &Context{Context: context.Background()},
},
{
testCase: "present_set_bool_and_different_ctx_bool",
setBoolInput: "ctx-bool",
ctxBoolInput: "not-ctx-bool",
newContextInput: nil,
},
{
testCase: "present_set_bool_and_different_ctx_bool_with_background_context",
setBoolInput: "ctx-bool",
ctxBoolInput: "not-ctx-bool",
newContextInput: &Context{Context: context.Background()},
},
}
for _, test := range tdata {

Loading…
Cancel
Save