|
14 | 14 | end |
15 | 15 |
|
16 | 16 | it "matches anything" do |
17 | | - expect(header).to be(:match?, "anything") |
| 17 | + expect(header).to be(:match?, '"anything"') |
18 | 18 | end |
19 | 19 | end |
20 | 20 |
|
21 | | - with "abcd" do |
| 21 | + with '"abcd"' do |
22 | 22 | it "is not a wildcard" do |
23 | 23 | expect(header).not.to be(:wildcard?) |
24 | 24 | end |
25 | 25 |
|
26 | 26 | it "matches itself" do |
27 | | - expect(header).to be(:match?, "abcd") |
| 27 | + expect(header).to be(:match?, '"abcd"') |
| 28 | + end |
| 29 | + |
| 30 | + it "strongly matches only another strong etag" do |
| 31 | + expect(header).to be(:strong_match?, '"abcd"') |
| 32 | + expect(header).not.to be(:strong_match?, 'W/"abcd"') |
| 33 | + end |
| 34 | + |
| 35 | + it "weakly matches both weak and strong etags" do |
| 36 | + expect(header).to be(:weak_match?, '"abcd"') |
| 37 | + expect(header).to be(:weak_match?, 'W/"abcd"') |
28 | 38 | end |
29 | 39 |
|
30 | 40 | it "does not match anything else" do |
31 | | - expect(header).not.to be(:match?, "anything else") |
| 41 | + expect(header).not.to be(:match?, '"anything else"') |
| 42 | + end |
| 43 | + end |
| 44 | + |
| 45 | + with 'W/"abcd"' do |
| 46 | + it "never strongly matches" do |
| 47 | + expect(header).not.to be(:strong_match?, '"abcd"') |
| 48 | + expect(header).not.to be(:strong_match?, 'W/"abcd"') |
| 49 | + end |
| 50 | + |
| 51 | + it "weakly matches both weak and strong etags" do |
| 52 | + expect(header).to be(:weak_match?, '"abcd"') |
| 53 | + expect(header).to be(:weak_match?, 'W/"abcd"') |
32 | 54 | end |
33 | 55 | end |
34 | 56 | end |
0 commit comments