Sha256: 9c826ef436abab2ca4d6f8c233681a4c83f032411e496ec2416a9d8b8fc5fecb

Contents?: true

Size: 790 Bytes

Versions: 18

Compression:

Stored size: 790 Bytes

Contents

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

describe Muck::HelperController do

  render_views
  
  describe "load_states_for_country" do
    before(:all) do
      @country = Factory(:country)
      @state = Factory(:state, :country => @country)
      @canada = Factory(:country, :abbreviation => 'CA')
      @us = Factory(:country, :abbreviation => 'US')
      @other_country = Factory(:country)
    end
    it "should load" do
      get_load_states_for_country
      should respond_with :success
    end
    it "should include state in resulting json" do
      get_load_states_for_country
      @response.body.should include(@state.name)
    end
  end
  
  def get_load_states_for_country
    get :load_states_for_country, :id => @country.to_param, :format => 'json'
  end
  
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
muck-engine-3.5.0 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.4.0 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.18 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.17 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.16 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.15 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.14 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.13 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.12 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.11 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.10 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.3.6 test/spec/controllers/helper_controller_spec.rb
muck-engine-3.0.8 test/rails_test/spec/controllers/helper_controller_spec.rb
muck-engine-3.0.7 test/rails_test/spec/controllers/helper_controller_spec.rb
muck-engine-3.0.6 test/rails_test/spec/controllers/helper_controller_spec.rb
muck-engine-3.0.5 test/rails_test/spec/controllers/helper_controller_spec.rb
muck-engine-3.0.4 test/rails_test/spec/controllers/helper_controller_spec.rb
muck-engine-3.0.3 test/rails_test/spec/controllers/helper_controller_spec.rb