Sha256: b531388fe65cb1fde28cec3938447792c3cc1f9b9f71bfdf5ac194e71bf02e7a
Contents?: true
Size: 549 Bytes
Versions: 6
Compression:
Stored size: 549 Bytes
Contents
require 'rails_helper' describe "events/index.json.jbuilder" do fixtures :all before(:each) do 20.times do |c| FactoryBot.create(:event) end assign(:events, Event.page(1)) end it "renders a list of events" do render # Run the generator again with the --webrat flag if you want to use webrat matchers expect(response.body).to match /\A\[/ data = JSON.parse(response.body) expect(data.first).not_to be_nil expect(data.first).to have_key("start") expect(data.first).to have_key("url") end end
Version data entries
6 entries across 6 versions & 1 rubygems