diff --git a/tests/acceptance-tests/steps/steps.py b/tests/acceptance-tests/steps/steps.py index f4b415c..1cb967f 100644 --- a/tests/acceptance-tests/steps/steps.py +++ b/tests/acceptance-tests/steps/steps.py @@ -62,6 +62,16 @@ def step_impl(context): accept-encoding: gzip user-agent: RIF/0.1.0"""[1:] +@given(u'a .rif file is on disk that has a URL template with a default') +def step_impl(context): + context.filename = '/vol/tests/test-data/url-params.rif' + context.variables = {} + context.expected_result = """ +GET /url-params?count=10 HTTP/1.1 +host: localhost:8080 +accept-encoding: gzip +user-agent: RIF/0.1.0"""[1:] + @when(u'the user runs RIF on that file passing in the appropriate variables') def step_impl(context): variable_args = [ diff --git a/tests/acceptance-tests/template-parameters.feature b/tests/acceptance-tests/template-parameters.feature index b8f3722..4b1dc81 100644 --- a/tests/acceptance-tests/template-parameters.feature +++ b/tests/acceptance-tests/template-parameters.feature @@ -5,3 +5,8 @@ Feature: Template Parameters Given a .rif file is on disk that has a URL template When the user runs RIF on that file passing in the appropriate variables Then RIF should return an echo of the request it made + + Scenario: The user makes a request with a URL template from a .rif file + Given a .rif file is on disk that has a URL template with a default + When the user runs RIF on that file passing in the appropriate variables + Then RIF should return an echo of the request it made