From a179e5b0f0438db120a59a6d785c8cb76ba88635 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Mon, 12 Nov 2012 07:26:13 -0600 Subject: [PATCH] * VRFS-72 merged --- app/views/api_search/index.rabl | 2 +- spec/requests/search_api_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/api_search/index.rabl b/app/views/api_search/index.rabl index 92f48b4db..fe51b2ef9 100644 --- a/app/views/api_search/index.rabl +++ b/app/views/api_search/index.rabl @@ -5,7 +5,7 @@ child(:bands => :bands) { } child(:musicians => :musicians) { - attributes :id, :first_name, :last_name :location, :photo_url + attributes :id, :first_name, :last_name, :location, :photo_url } child(:fans => :fans) { diff --git a/spec/requests/search_api_spec.rb b/spec/requests/search_api_spec.rb index 9dfc98f89..f3ef15d76 100644 --- a/spec/requests/search_api_spec.rb +++ b/spec/requests/search_api_spec.rb @@ -28,8 +28,8 @@ describe "Search API ", :type => :api do it "simple search" do User.delete_search_index # so that the user created before the test and logged in doesn't show up User.create_search_index - @musician = FactoryGirl.create(:user, name: "Peach", email: "user@example.com", musician: true) - @fan = FactoryGirl.create(:user, name: "Peach Peach", email: "fan@example.com", musician: false) + @musician = FactoryGirl.create(:user, first_name: "Peach", last_name: "Nothing", name: "peach1", email: "user@example.com", musician: true) + @fan = FactoryGirl.create(:user, first_name: "Peach Peach", last_name: "Grovery", name: "peach2", email: "fan@example.com", musician: false) @band = Band.save(name: "Peach pit", website: "www.bands.com", biography: "zomg we rock") @band2 = Band.save(name: "Peach", website: "www.bands2.com", biography: "zomg we rock") User.search_index.refresh