@@ -27,62 +27,32 @@ import (
2727var _ = Describe ("RequiresExactMatch function" , func () {
2828
2929 It ("Returns false when the selector matches everything" , func () {
30- _ , _ , requiresExactMatch := RequiresExactMatch (fields .Everything ())
30+ requiresExactMatch := RequiresExactMatch (fields .Everything ())
3131 Expect (requiresExactMatch ).To (BeFalse ())
3232 })
3333
3434 It ("Returns false when the selector matches nothing" , func () {
35- _ , _ , requiresExactMatch := RequiresExactMatch (fields .Nothing ())
35+ requiresExactMatch := RequiresExactMatch (fields .Nothing ())
3636 Expect (requiresExactMatch ).To (BeFalse ())
3737 })
3838
3939 It ("Returns false when the selector has the form key!=val" , func () {
40- _ , _ , requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key!=val" ))
40+ requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key!=val" ))
4141 Expect (requiresExactMatch ).To (BeFalse ())
4242 })
4343
44- It ("Returns false when the selector has the form key1==val1,key2==val2" , func () {
45- _ , _ , requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key1==val1,key2==val2" ))
46- Expect (requiresExactMatch ).To (BeFalse ())
44+ It ("Returns true when the selector has the form key1==val1,key2==val2" , func () {
45+ requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key1==val1,key2==val2" ))
46+ Expect (requiresExactMatch ).To (BeTrue ())
4747 })
4848
4949 It ("Returns true when the selector has the form key==val" , func () {
50- _ , _ , requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key==val" ))
50+ requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key==val" ))
5151 Expect (requiresExactMatch ).To (BeTrue ())
5252 })
5353
5454 It ("Returns true when the selector has the form key=val" , func () {
55- _ , _ , requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key=val" ))
55+ requiresExactMatch := RequiresExactMatch (fields .ParseSelectorOrDie ("key=val" ))
5656 Expect (requiresExactMatch ).To (BeTrue ())
5757 })
58-
59- It ("Returns empty key and value when the selector matches everything" , func () {
60- key , val , _ := RequiresExactMatch (fields .Everything ())
61- Expect (key ).To (Equal ("" ))
62- Expect (val ).To (Equal ("" ))
63- })
64-
65- It ("Returns empty key and value when the selector matches nothing" , func () {
66- key , val , _ := RequiresExactMatch (fields .Nothing ())
67- Expect (key ).To (Equal ("" ))
68- Expect (val ).To (Equal ("" ))
69- })
70-
71- It ("Returns empty key and value when the selector has the form key!=val" , func () {
72- key , val , _ := RequiresExactMatch (fields .ParseSelectorOrDie ("key!=val" ))
73- Expect (key ).To (Equal ("" ))
74- Expect (val ).To (Equal ("" ))
75- })
76-
77- It ("Returns key and value when the selector has the form key==val" , func () {
78- key , val , _ := RequiresExactMatch (fields .ParseSelectorOrDie ("key==val" ))
79- Expect (key ).To (Equal ("key" ))
80- Expect (val ).To (Equal ("val" ))
81- })
82-
83- It ("Returns key and value when the selector has the form key=val" , func () {
84- key , val , _ := RequiresExactMatch (fields .ParseSelectorOrDie ("key=val" ))
85- Expect (key ).To (Equal ("key" ))
86- Expect (val ).To (Equal ("val" ))
87- })
8858})
0 commit comments