require 'spec_helper'
require 'rake'
RSpec.describe Api::V1::PostsController, :vcr, record: :new_episodes, :type => :api do
context "elastic search test", elasticsearch: true, commit: true do
before do
@post = FactoryGirl.create(:post, first_name: "August", last_name: "Rush", email: "August.Rush@augustrush.com", event: "Rock Concert")
end
it "should handle case-insensitive searching for a user" do
sleep 1
get "1/posts", {:search=>"Rush"}
expect(last_response.body).to include("August", "Rush")
end
end
end