Sha256: c5ee22a53e37627b4685509b5a60dea498ef0a6cce78d0c639681e4a1ce192a1

Contents?: true

Size: 634 Bytes

Versions: 2

Compression:

Stored size: 634 Bytes

Contents

# coding: utf-8

require 'test/unit/helper'

class ThinReports::Report::TestEvents < MiniTest::Unit::TestCase
  include ThinReports::TestHelpers
  
  # Alias
  Report = ThinReports::Report
  
  def test_event_types
    events = Report::Events.new
    assert_equal events.instance_variable_get(:@types), [:page_create, :generate]
  end
  
  def test_event_properly_store_the_properties
    e = Report::Events::Event.new(:page_create, :target, :page, :pages)
    assert_equal [e.type, e.target, e.page, e.pages],
                 [:page_create, :target, :page, :pages]
    assert_same e.target, e.report
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thinreports-0.7.0 test/unit/report/test_events.rb
thinreports-0.6.0.pre3 test/unit/report/test_events.rb