@@ -17,38 +17,43 @@ func TestCheckSubject(t *testing.T) {
1717 wantErr bool
1818 }{
1919 {
20- name : "valid type/ severity" ,
20+ name : "valid type and severity" ,
2121 args : args {subject : "BUG/MEDIUM: config: add default location of path to the configuration file" },
2222 wantErr : false ,
2323 },
2424 {
25- name : "bug-fail " ,
25+ name : "short subject " ,
2626 args : args {subject : "BUG/MEDIUM: config: default" },
2727 wantErr : true ,
2828 },
2929 {
3030 name : "missing severity" ,
31- args : args {subject : "BUG/: config: default" },
31+ args : args {subject : "BUG/: config: default implementation " },
3232 wantErr : true ,
3333 },
3434 {
3535 name : "wrong tag" ,
36- args : args {subject : "WRONG: config: default" },
36+ args : args {subject : "WRONG: config: default implementation " },
3737 wantErr : true ,
3838 },
3939 {
4040 name : "wrong severity" ,
41- args : args {subject : "BUG/WRONG: config: default" },
41+ args : args {subject : "BUG/WRONG: config: default implementation " },
4242 wantErr : true ,
4343 },
4444 {
4545 name : "double spaces" ,
46- args : args {subject : "BUG/MEDIUM: config: default" },
46+ args : args {subject : "BUG/MEDIUM: config: default implementation " },
4747 wantErr : true ,
4848 },
4949 {
5050 name : "trailing spaces" ,
51- args : args {subject : "BUG/MEDIUM: config: default " },
51+ args : args {subject : "BUG/MEDIUM: config: default implementation " },
52+ wantErr : true ,
53+ },
54+ {
55+ name : "unprocessed tags remain" ,
56+ args : args {subject : "BUG/MINOR: MAJOR: config: default implementation" },
5257 wantErr : true ,
5358 },
5459 }
0 commit comments