Sha256: 126fd20bdaf4cff3a90421a7b179ad08c0f49922db3ea6eeedfe311c9c56cc23

Contents?: true

Size: 570 Bytes

Versions: 1

Compression:

Stored size: 570 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class NodeTest < Minitest::Test
  def test_single_labels
    node = Redgraph::Node.new(label: "film")
    assert_equal(["film"], node.labels)
    assert_equal("film", node.label)
  end

  def test_multiple_labels
    node = Redgraph::Node.new(labels: ["film", "drama"])
    assert_equal(["film", "drama"], node.labels)
    assert_equal("film", node.label)
  end

  def test_conflicting_labels
    assert_raises(Redgraph::Error) do
      Redgraph::Node.new(labels: ["film", "drama"], label: "film")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redgraph-0.2.3 test/node_test.rb