Sha256: cd16b0c8cd946356f0c9efda67c76a30bc34803166129f997a82d6edd1c3f176
Contents?: true
Size: 527 Bytes
Versions: 26
Compression:
Stored size: 527 Bytes
Contents
require 'spec_helper' describe Spree::State, type: :model do it "can find a state by name or abbr" do state = create(:state, name: "California", abbr: "CA") expect(Spree::State.find_all_by_name_or_abbr("California")).to include(state) expect(Spree::State.find_all_by_name_or_abbr("CA")).to include(state) end it "can find all states group by country id" do state = create(:state) expect(Spree::State.states_group_by_country_id).to eq({ state.country_id.to_s => [[state.id, state.name]] }) end end
Version data entries
26 entries across 26 versions & 1 rubygems