Sha256: eab76278ce7ab3b8679e8c3e4a54d4ee2f3f1c728a158040d72b304e0ccbe03a

Contents?: true

Size: 643 Bytes

Versions: 3

Compression:

Stored size: 643 Bytes

Contents

require 'rails_helper'

module Chaskiq
  RSpec.describe CampaignsController, type: :controller do

    render_views
    routes { Chaskiq::Engine.routes }
    let(:list){ FactoryGirl.create(:chaskiq_list) }
    let(:subscriber){
      list.create_subscriber FactoryGirl.attributes_for(:chaskiq_subscriber)
    }
    let(:campaign){ FactoryGirl.create(:chaskiq_campaign, list: list) }


    it "will show campaign!" do
      campaign
      response = get("show", id: campaign.id)
      expect(response.status).to be == 200
      expect(response.body).to include "subscribe"
      expect(response.body).to include campaign.name
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chaskiq-0.0.6 spec/controllers/chaskiq/campaigns_controller_spec.rb
chaskiq-0.0.5 spec/controllers/chaskiq/campaigns_controller_spec.rb
chaskiq-0.0.4 spec/controllers/chaskiq/campaigns_controller_spec.rb