MCPcopy Create free account
hub / github.com/pace/bricks / TestScope_Add

Function TestScope_Add

http/oauth2/scope_test.go:34–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32}
33
34func TestScope_Add(t *testing.T) {
35 type args struct {
36 scope string
37 }
38 tests := []struct {
39 name string
40 s Scope
41 args args
42 want Scope
43 }{
44 {"add one", Scope("a:read"), args{"b:write"}, Scope("a:read b:write")},
45 }
46 for _, tt := range tests {
47 t.Run(tt.name, func(t *testing.T) {
48 if got := tt.s.Add(tt.args.scope); got != tt.want {
49 t.Errorf("Add() = %v, want %v", got, tt.want)
50 }
51 })
52 }
53}

Callers

nothing calls this directly

Calls 4

ScopeTypeAlias · 0.85
ErrorfMethod · 0.80
AddMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…