library(RNeo4j)
context("Labels")
skip_on_cran()
neo4j = startTestGraph()
mugshots = createNode(neo4j, "Bar", name="Mugshots")
test_that("getLabel works", {
lab = getLabel(mugshots)
expect_equal(lab, "Bar")
})
test_that("addLabel works", {
addLabel(mugshots, "Restaurant")
lab = getLabel(mugshots)
expect_true("Bar" %in% lab)
expect_true("Restaurant" %in% lab)
})
test_that("dropLabel works with given label", {
dropLabel(mugshots, "Restaurant")
lab = getLabel(mugshots)
expect_equal(lab, "Bar")
})
test_that("dropLabel works with all=TRUE", {
dropLabel(mugshots, all=TRUE)
lab = getLabel(mugshots)
expect_null(lab)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.