Step 3 - Testing ElasticSearch - posts_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment