Sha256: 2fa28ef0ee0c24bda28c12161c9bc4bc5280d581a496a3e64f6df4eee1cd88f5

Contents?: true

Size: 674 Bytes

Versions: 2

Compression:

Stored size: 674 Bytes

Contents

require 'spec_helper'

describe Addresses::NeighborhoodsController do
    #routes { Addresses::Engine.routes }
    
    before (:each) do
        @state = FactoryGirl.create(:addresses_state)
        @city = FactoryGirl.create(:addresses_city, state: @state)
        @neighborhood = FactoryGirl.create(:addresses_neighborhood, city: @city)
    end

    describe "GET /neighborhoods" do 
        it "should return an interview" do
            get addresses.neighborhoods_path(city_id: @city.id), format: "json"
            
            json = JSON.parse(response.body)

            json[0]["name"].should == @neighborhood.name
        end
    end
end                         

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
addresses-0.0.9 spec/requests/neighborhoods_spec.rb
addresses-0.0.7 spec/requests/neighborhoods_spec.rb