Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Those tests are not valid behavior

  • Loading branch information...
commit 9e98390ac51d6b8bdb5d612349fdb9c304fccd67 1 parent 6d7e73d
@dkowis dkowis authored
View
59 betamax-proxy/src/test/groovy/co/freeside/betamax/proxy/matchRules/CustomMatcherSpec.groovy
@@ -33,63 +33,4 @@ class CustomMatcherSpec extends Specification {
return output
}
-
- void "Using a custom matcher it should replay"() {
- given:
- def imr = new InstrumentedMatchRule()
- def proxyConfig = ProxyConfiguration.builder()
- .sslEnabled(true)
- .tapeRoot(tapeRoot)
- .defaultMode(TapeMode.READ_ONLY)
- .defaultMatchRule(imr)
- .build()
-
- def recorder = new Recorder(proxyConfig)
- recorder.start("httpBinTape")
- imr.requestValidations << { r ->
- //Will run this request validation on both requests being matched
- //No matter what, either recorded, or sent, I should have a payload of "BUTTS"
- //I'm posting "BUTTS" and the recorded interaction should have "BUTTS"
- if(!r.hasBody() ){
- println("REQUEST BODY WASNT THERE!!!")
- }
- }
-
- when:
- def response = simplePost("https://httpbin.org/post", "BUTTS")
- then:
- def content = response.toString()
- recorder.stop()
-
- content == "Hey look some text: BUTTS"
- }
-
- void "When the tape only contains a single entry in #mode, it should only match once"() {
- given:
- def imr = new InstrumentedMatchRule()
- def proxyConfig = ProxyConfiguration.builder()
- .sslEnabled(true)
- .tapeRoot(tapeRoot)
- .defaultMode(mode)
- .defaultMatchRule(imr)
- .build()
-
- def recorder = new Recorder(proxyConfig)
- recorder.start("httpBinTape")
-
- when:
- assert (imr.counter.get() == 0)
- def response = simplePost("https://httpbin.org/post", "BUTTS")
-
- then:
- recorder.stop()
-
- imr.counter.get() == 1
- response == "Hey look some text: BUTTS"
-
- where:
- mode << [TapeMode.READ_ONLY, TapeMode.READ_WRITE]
- }
-
-
}
Please sign in to comment.
Something went wrong with that request. Please try again.