Sha256: 8ecfce08bdc2a7842c6f3f45056bc92e69838b376352da35223c9e1d5f2a6ba8
Contents?: true
Size: 534 Bytes
Versions: 2
Compression:
Stored size: 534 Bytes
Contents
require 'spec_helper' module Spree describe Api::V1::CountriesController do render_views before do stub_authentication! @state = Factory(:state) @country = @state.country end it "gets all countries" do api_get :index json_response.first['country']['iso3'].should eq @country.iso3 end it "includes states" do api_get :show, :id => @country.id states = json_response['country']['states'] states.first['state']['name'].should eq @state.name end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_api-1.1.0 | spec/controllers/spree/api/v1/countries_controller_spec.rb |
spree_api-1.1.0.rc2 | spec/controllers/spree/api/v1/countries_controller_spec.rb |