Sha256: 78803ed99423aa30239cc0e33503f89b920bb63609ca2c68641104b8fda608aa

Contents?: true

Size: 829 Bytes

Versions: 35

Compression:

Stored size: 829 Bytes

Contents

require 'spec_helper'

class StubAccountSettingsController < Iugu::AccountSettingsController

  def index
     render :text => "true", :layout => false, :formats => [:html], :status => 200
  end
  
end

describe StubAccountSettingsController do

  def with_stub_routing
    with_routing do |map|
      map.draw do
        match '/stub/account/settings/index' => "stub_account_settings#index"
      end
      yield
    end
  end

  before(:each) do
    @account = Fabricate(:account)
  end
  login_as_user

  it 'should render 404' do
    @account.destroy
    with_stub_routing do
      get :index, :account_id => @account.id
    end
    response.should_not be_success
  end

  it 'should not render 404' do
    with_stub_routing do
      get :index, :account_id => @account.id
    end
    response.should be_success
  end
  
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
iugusdk-1.0.11 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.10 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.9 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.8 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.7 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.6 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.5 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.4 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.3 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.2 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.1 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.32 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.31 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.30 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.29 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.28 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.27 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.26 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.25 spec/controllers/account_settings_controller_spec.rb
iugusdk-1.0.0.alpha.24 spec/controllers/account_settings_controller_spec.rb