docbrown/spec/requests/events_spec.rb
Jess Lee 7cf3ae69f5 Show Pages For Events (#30)
* sort past events by most recent

* update-event-slugs

* adds tests

* fix linting issues

* remove pry
2018-03-09 16:46:27 -08:00

20 lines
No EOL
440 B
Ruby

require "rails_helper"
RSpec.describe "Events", type: :request do
before do
@event = create(:event)
end
describe "GET events" do
it "returns index page" do
get "/events"
expect(response.body).to include "DEV EVENTS"
end
it "returns event show page" do
@event.published = true
@event.save
get "/events/#{@event.slug}"
expect(response.body).to include @event.title
end
end
end