Remove newrelic from gemfile, add a couple tests.
This commit is contained in:
parent
9c32679ce9
commit
9da7e1fbd2
3
Gemfile
3
Gemfile
@ -49,6 +49,3 @@ group :test do
|
||||
gem 'webmock'
|
||||
end
|
||||
|
||||
group :staging, :production do
|
||||
gem 'newrelic_rpm', '>= 3.7.3'
|
||||
end
|
||||
|
@ -120,7 +120,6 @@ GEM
|
||||
mini_portile (0.5.3)
|
||||
minitest (4.7.5)
|
||||
multi_json (1.9.2)
|
||||
newrelic_rpm (3.7.3.204)
|
||||
nokogiri (1.6.1)
|
||||
mini_portile (~> 0.5.0)
|
||||
orm_adapter (0.5.0)
|
||||
@ -241,7 +240,6 @@ DEPENDENCIES
|
||||
jbuilder
|
||||
jquery-rails
|
||||
launchy
|
||||
newrelic_rpm (>= 3.7.3)
|
||||
pg
|
||||
pry-rails
|
||||
rack-timeout
|
||||
|
@ -6,6 +6,7 @@ Vidpush::Application.routes.draw do
|
||||
devise_for :users, :controllers => {registrations: "registrations"}
|
||||
|
||||
end
|
||||
|
||||
root to: "campaigns#index"
|
||||
|
||||
resources :campaigns, param: :clientid
|
||||
|
@ -9,6 +9,22 @@ describe CampaignsController do
|
||||
let(:campaign){ attributes_for :campaign }
|
||||
let(:videolisting){ attributes_for :videolisting }
|
||||
|
||||
it 'should show the index page' do
|
||||
get :index
|
||||
expect(response.status).to eq 200
|
||||
end
|
||||
|
||||
it 'should show the campaign page' do
|
||||
post :create, campaign: campaign
|
||||
get :show, campaign
|
||||
expect(response.status).to eq 200
|
||||
end
|
||||
|
||||
it 'raises routing error when campaign not found' do
|
||||
expect(lambda { get :show, { :clientid => "x" } }).to raise_error(ActionController::RoutingError)
|
||||
end
|
||||
|
||||
|
||||
it 'creates a campaign from json post' do
|
||||
post :create, campaign: campaign
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user