@@ -14,7 +14,7 @@ class DashboardServiceRemoteTests: RemoteTestCase, RESTTestable {
1414 //
1515 func testRequestCardsParam( ) {
1616 let expect = expectation ( description: " Get cards successfully " )
17- stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards/v1_1 /?cards=posts,todays_stats " , filename: " dashboard-200-with-drafts-and-scheduled-posts.json " , contentType: . ApplicationJSON)
17+ stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards-data /?cards=posts,todays_stats " , filename: " dashboard-200-with-drafts-and-scheduled-posts.json " , contentType: . ApplicationJSON)
1818
1919 dashboardServiceRemote. fetch ( cards: [ " posts " , " todays_stats " ] , forBlogID: 165243437 ) { _ in
2020 expect. fulfill ( )
@@ -27,7 +27,7 @@ class DashboardServiceRemoteTests: RemoteTestCase, RESTTestable {
2727 //
2828 func testRequestCards( ) {
2929 let expect = expectation ( description: " Get cards successfully " )
30- stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards/v1_1 /?cards=posts,todays_stats " , filename: " dashboard-200-with-drafts-and-scheduled-posts.json " , contentType: . ApplicationJSON)
30+ stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards-data /?cards=posts,todays_stats " , filename: " dashboard-200-with-drafts-and-scheduled-posts.json " , contentType: . ApplicationJSON)
3131
3232 dashboardServiceRemote. fetch ( cards: [ " posts " , " todays_stats " ] , forBlogID: 165243437 ) { cards in
3333 XCTAssertTrue ( ( cards [ " posts " ] as! NSDictionary ) [ " has_published " ] as! Bool )
@@ -42,7 +42,7 @@ class DashboardServiceRemoteTests: RemoteTestCase, RESTTestable {
4242 //
4343 func testRequestFails( ) {
4444 let expect = expectation ( description: " Get cards successfully " )
45- stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards/v1_1 /?cards=posts,todays_stats " , filename: " dashboard-200-with-drafts-and-scheduled-posts.json " , contentType: . ApplicationJSON, status: 503 )
45+ stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards-data /?cards=posts,todays_stats " , filename: " dashboard-200-with-drafts-and-scheduled-posts.json " , contentType: . ApplicationJSON, status: 503 )
4646
4747 dashboardServiceRemote. fetch ( cards: [ " posts " , " todays_stats " ] , forBlogID: 165243437 ) { _ in
4848 XCTFail ( " This call should not suceed " )
@@ -57,7 +57,7 @@ class DashboardServiceRemoteTests: RemoteTestCase, RESTTestable {
5757 //
5858 func testRequestInvalidCard( ) {
5959 let expect = expectation ( description: " Get cards successfully " )
60- stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards/v1_1 /?cards=invalid_card " , filename: " dashboard-400-invalid-card.json " , contentType: . ApplicationJSON, status: 400 )
60+ stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards-data /?cards=invalid_card " , filename: " dashboard-400-invalid-card.json " , contentType: . ApplicationJSON, status: 400 )
6161
6262 dashboardServiceRemote. fetch ( cards: [ " invalid_card " ] , forBlogID: 165243437 ) { _ in
6363 XCTFail ( " This call should not suceed " )
@@ -72,7 +72,7 @@ class DashboardServiceRemoteTests: RemoteTestCase, RESTTestable {
7272 //
7373 func testRequestInvalidJSON( ) {
7474 let expect = expectation ( description: " Get cards successfully " )
75- stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards/v1_1 /?cards=posts,todays_stats " , data: " foo " . data ( using: . utf8) !, contentType: . ApplicationJSON)
75+ stubRemoteResponse ( " wpcom/v2/sites/165243437/dashboard/cards-data /?cards=posts,todays_stats " , data: " foo " . data ( using: . utf8) !, contentType: . ApplicationJSON)
7676
7777 dashboardServiceRemote. fetch ( cards: [ " posts " , " todays_stats " ] , forBlogID: 165243437 ) { _ in
7878 XCTFail ( " This call should not suceed " )
0 commit comments