Sha256: 90c58a5d0f0a2623cee5f2a3cd6bf5447ea970a5c3c06425092445c1928871b8

Contents?: true

Size: 722 Bytes

Versions: 24

Compression:

Stored size: 722 Bytes

Contents

require 'spec_helper'

describe DispatchLinksController do
  fixtures :all
  
  before do
    @dispatch_link = dispatch_links(:google)
  end
  
  it "should record a click" do
    lambda {
      get 'show', :id => @dispatch_link.position, :dispatch_id => @dispatch_link.dispatch_id
    }.should change(DispatchLinkClick, :count).by(1)
  end
  
  it "should redirect" do
    get 'show', :id => @dispatch_link.position, :dispatch_id => @dispatch_link.dispatch_id
    response.should redirect_to(@dispatch_link.uri)
  end
  
  it "should be nested" do
    dispatch_link_path(@dispatch_link.dispatch_id, @dispatch_link.position).should == "/dispatches/#{@dispatch_link.dispatch_id}/links/#{@dispatch_link.position}"
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.9 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.8 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.7 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.6 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.5 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.4 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.3 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.2 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.1 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.1.0 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.18 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.17 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.16 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.15 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.14 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.13 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.12 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.11 lib/forge/spec/controllers/dispatch_links_controller_spec.rb
forge-cli-0.0.10 lib/forge/spec/controllers/dispatch_links_controller_spec.rb