Sha256: 2e3cd4bab46623789ce46e5cd361f3d6db0d301de3108cb30618229bc23e03bf

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

require "test_helper"
require "elefant/stats"

class StatsTest < PGTest

  def setup
    super
    @stats = Elefant::Stats.new
  end

  def test_retrieves_activity
    result = @stats.get("activity", [])

    assert_instance_of Array, result
    refute_empty result
  end

  def test_retrieves_user_indices
    result = @stats.get("user_indexes", [])

    assert_instance_of Array, result
    refute_empty result
    assert_equal "elefant_test_models", result[0]["rel_name"]
  end

  def test_raises_for_unknown
    assert_raises ArgumentError do
      @stats.get("totallyweirdunknownstatname")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elefant-0.0.1 test/stats_test.rb