Sha256: a54266f38e44afeddb2ae64539ca96ce85ceb19d386ed511d84da8f915cd9117

Contents?: true

Size: 971 Bytes

Versions: 1

Compression:

Stored size: 971 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'mitamirri'

describe "TrackableAction" do
  
  describe 'creates a new object from parameters' do
  
    before :all do
      @new = TrackableAction.create_from_params(
        :session_id => 123456,
        :referrer => '/',
        :ip_address => '123.123.123.1',
        :site => 'www.seologic.com',
        :kind => 'click',
        :label => 'Some Random Click',
        :url => 'http://www.seologic.com/foo/bar/'
      )
    end
    
    it 'with a kind' do
      @new.kind.should == 'click'
    end
    
    it 'with a label' do 
      @new.label.should == 'Some Random Click'
    end
    
    it 'with a referrer' do
      @new.referrer.should == '/'
    end
    
    it 'with a URL' do
      @new.url.should == 'http://www.seologic.com/foo/bar/'
    end
    
    it 'with an associated trackable session' do
      @new.trackable_session_id.should_not be_nil
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mitamirri-0.13.8 spec/models/trackable_action_spec.rb