Skip to content

Commit

Permalink
Add gx.isElement test
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Stegmaier committed Oct 9, 2017
1 parent 306b0d9 commit 9d76bd2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/testthat/test_geneXplainR.R
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,17 @@ test_that("gx.enrichedUpstreamAnalysis", {
})

test_that("gx.exists",{
expect_output(gx.exists("gx.put"), "TRUE")
expect_output(gx.exists("put"),"TRUE")
expect_output(gx.exists("42"),"FALSE")
expect_output(gx.exists("gx.put"), "TRUE")
expect_output(gx.exists("put"),"TRUE")
expect_output(gx.exists("42"),"FALSE")
})


test_that("gx.isElement",{
before.test.connection()
bioumlQueryValue <<- "{\"type\":0,\"values\":\"{\\\"names\\\":[{\\\"name\\\":\\\"Data\\\"},{\\\"name\\\":\\\"More\\\"}]}\"}"
expect_true(gx.isElement("test.folder", "Data"))
expect_false(gx.isElement("test.folder", "42"))
expect_true(gx.isElement("test.folder", "More"))
expect_equal(as.character(queryJsonArgs$params['dc']), "test.folder")
clean.after.test()
})

0 comments on commit 9d76bd2

Please sign in to comment.