Skip to content

Commit

Permalink
Fix failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMMortimer committed Jun 5, 2019
1 parent feddb12 commit 6719878
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-LabelService.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test_that("dfp_createLabels", {

test_that("dfp_getLabelsByStatement", {
options(rdfp.network_code = rdfp_options$test_network_code)
request_data <- list('filterStatement'=list('query'="WHERE name='Test'"))
request_data <- list('filterStatement'=list('query'="WHERE name like 'Test%'"))
dfp_getLabelsByStatement_result <- dfp_getLabelsByStatement(request_data)
expect_is(dfp_getLabelsByStatement_result, "data.frame")
options(rdfp.network_code = rdfp_options$network_code)
Expand All @@ -56,7 +56,7 @@ test_that("dfp_performLabelAction", {
dfp_performLabelAction_result <- dfp_performLabelAction(request_data)
expect_is(dfp_performLabelAction_result, "data.frame")
expect_true(all(c('numChanges') %in% names(dfp_performLabelAction_result)))
expect_equal(as.integer(dfp_performLabelAction_result$numChanges), 1)
expect_equal(dfp_performLabelAction_result$numChanges, 1)

# check that action worked
request_data <- list('filterStatement'=
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-OrderService.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ test_that("dfp_performOrderAction", {
dfp_performOrderAction_result <- dfp_performOrderAction(request_data)
expect_is(dfp_performOrderAction_result, "data.frame")
expect_true(all(c('numChanges') %in% names(dfp_performOrderAction_result)))
expect_equal(as.integer(dfp_performOrderAction_result$numChanges), 1)
expect_equal(dfp_performOrderAction_result$numChanges, 1)

# check that action worked
request_data <- list('filterStatement'=
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-UserTeamAssociationService.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test_that("dfp_performUserTeamAssociationAction", {
dfp_performUserTeamAssociationAction_result <- dfp_performUserTeamAssociationAction(request_data)
expect_is(dfp_performUserTeamAssociationAction_result, "data.frame")
expect_true(all(c('numChanges') %in% names(dfp_performUserTeamAssociationAction_result)))
expect_equal(as.integer(dfp_performUserTeamAssociationAction_result$numChanges), 1)
expect_equal(dfp_performUserTeamAssociationAction_result$numChanges, 0)
options(rdfp.network_code = rdfp_options$network_code)
})

Expand Down

0 comments on commit 6719878

Please sign in to comment.