Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created August 30, 2013 15:30
Show Gist options
  • Select an option

  • Save Heavyblade/6391055 to your computer and use it in GitHub Desktop.

Select an option

Save Heavyblade/6391055 to your computer and use it in GitHub Desktop.
it "should be able to create a land" do
params[:property][:property_details_attributes] = FactoryGirl.attributes_for(:land_property)
params[:property][:property_details_attributes][:address_attributes] = FactoryGirl.attributes_for(:address)
params[:type] = "land_property"
xhr :post, :create, params
response.should be_success
body = JSON.parse(response.body)
body['msg'].should == "Successfully create property"
LandProperty.count.should == 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment