(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func 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 | } |