Skip to content

Commit

Permalink
This appears to not be a problem with the matcher, but the proxy
Browse files Browse the repository at this point in the history
Somehow, the request body isn't coming through...
  • Loading branch information
David Kowis committed Nov 19, 2013
1 parent 040bf20 commit d312093
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -3,8 +3,6 @@ package co.freeside.betamax.proxy.matchRules
import co.freeside.betamax.ProxyConfiguration import co.freeside.betamax.ProxyConfiguration
import co.freeside.betamax.Recorder import co.freeside.betamax.Recorder
import co.freeside.betamax.TapeMode import co.freeside.betamax.TapeMode
import groovyx.net.http.ContentType
import groovyx.net.http.RESTClient
import spock.lang.Shared import spock.lang.Shared
import spock.lang.Specification import spock.lang.Specification
import spock.lang.Unroll import spock.lang.Unroll
Expand All @@ -27,6 +25,7 @@ class CustomMatcherSpec extends Specification {
conn.setFixedLengthStreamingMode(payload.getBytes().length) conn.setFixedLengthStreamingMode(payload.getBytes().length)
def out = new PrintWriter(conn.getOutputStream()) def out = new PrintWriter(conn.getOutputStream())
out.print(payload) out.print(payload)
out.flush()
out.close() out.close()


output = conn.getInputStream().getText() output = conn.getInputStream().getText()
Expand All @@ -50,6 +49,7 @@ class CustomMatcherSpec extends Specification {
imr.requestValidations << { r -> imr.requestValidations << { r ->
//Will run this request validation on both requests being matched //Will run this request validation on both requests being matched
//No matter what, either recorded, or sent, I should have a payload of "BUTTS" //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.bodyAsText.input.text != "BUTTS" ){ if(r.bodyAsText.input.text != "BUTTS" ){
println("REQUEST BODY WASNT THERE!!!") println("REQUEST BODY WASNT THERE!!!")
} }
Expand Down

0 comments on commit d312093

Please sign in to comment.