@@ -8,64 +8,64 @@ class ObligationsResourceSpec extends BaseFunctionalSpec {
88
99 " return code 400 when vrn is invalid" in {
1010 when()
11- .get(s " /vat/ abc/obligations?from=2017-01-01&to=2017-03-31&status=A " )
11+ .get(s " /abc/obligations?from=2017-01-01&to=2017-03-31&status=A " )
1212 .thenAssertThat()
1313 .statusIs(400 )
1414 .isBadRequest(" VRN_INVALID" )
1515 }
1616
1717 " return code 400 when from is missing" in {
1818 when()
19- .get(s " /vat/ $vrn/obligations?to=2017-03-31&status=A " )
19+ .get(s " / $vrn/obligations?to=2017-03-31&status=A " )
2020 .thenAssertThat()
2121 .statusIs(400 )
2222 }
2323
2424 " return code 400 when from is invalid" in {
2525 when()
26- .get(s " /vat/ $vrn/obligations?from=abc&to=2017-03-31&status=A " )
26+ .get(s " / $vrn/obligations?from=abc&to=2017-03-31&status=A " )
2727 .thenAssertThat()
2828 .statusIs(400 )
2929 }
3030
3131 " return code 400 when to is missing" in {
3232 when()
33- .get(s " /vat/ $vrn/obligations?from=2017-01-01&status=A " )
33+ .get(s " / $vrn/obligations?from=2017-01-01&status=A " )
3434 .thenAssertThat()
3535 .statusIs(400 )
3636 }
3737
3838 " return code 400 when to is invalid" in {
3939 when()
40- .get(s " /vat/ $vrn/obligations?from=2017-01-01&to=abc&status=A " )
40+ .get(s " / $vrn/obligations?from=2017-01-01&to=abc&status=A " )
4141 .thenAssertThat()
4242 .statusIs(400 )
4343 }
4444
4545 " return code 400 when status is missing" in {
4646 when()
47- .get(s " /vat/ $vrn/obligations?from=2017-01-01&to=2017-03-31 " )
47+ .get(s " / $vrn/obligations?from=2017-01-01&to=2017-03-31 " )
4848 .thenAssertThat()
4949 .statusIs(400 )
5050 }
5151
5252 " return code 400 when status is invalid" in {
5353 when()
54- .get(s " /vat/ $vrn/obligations?from=2017-01-01&to=2017-03-31&status=X " )
54+ .get(s " / $vrn/obligations?from=2017-01-01&to=2017-03-31&status=X " )
5555 .thenAssertThat()
5656 .statusIs(400 )
5757 }
5858
5959 " return code 400 when from is after to" in {
6060 when()
61- .get(s " /vat/ $vrn/obligations?from=2017-04-01&to=2017-03-31&status=A " )
61+ .get(s " / $vrn/obligations?from=2017-04-01&to=2017-03-31&status=A " )
6262 .thenAssertThat()
6363 .statusIs(400 )
6464 }
6565
6666 " return code 400 when date range between from and to is more than 366 days" in {
6767 when()
68- .get(s " /vat/ $vrn/obligations?from=2017-01-01&to=2018-01-02&status=A " )
68+ .get(s " / $vrn/obligations?from=2017-01-01&to=2018-01-02&status=A " )
6969 .thenAssertThat()
7070 .statusIs(400 )
7171 }
@@ -74,7 +74,7 @@ class ObligationsResourceSpec extends BaseFunctionalSpec {
7474 given ()
7575 .des().obligations.obligationNotFoundFor(vrn)
7676 .when()
77- .get(s " /vat/ $vrn/obligations?from=2017-01-01&to=2017-08-31&status=A " )
77+ .get(s " / $vrn/obligations?from=2017-01-01&to=2017-08-31&status=A " )
7878 .thenAssertThat()
7979 .statusIs(404 )
8080 }
@@ -83,7 +83,7 @@ class ObligationsResourceSpec extends BaseFunctionalSpec {
8383 given ()
8484 .des().obligations.returnObligationsFor(vrn)
8585 .when()
86- .get(s " /vat/ $vrn/obligations?from=2017-01-01&to=2017-08-31&status=A " )
86+ .get(s " / $vrn/obligations?from=2017-01-01&to=2017-08-31&status=A " )
8787 .thenAssertThat()
8888 .statusIs(200 )
8989 .bodyIsLike(Jsons .Obligations (firstMet = true ).toString)
0 commit comments