From 451ed81010f8be04eedd854380cf3c1606f97d0c Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Mon, 8 Feb 2016 12:00:38 +0800 Subject: [PATCH] remove tests that shouldn't be there --- spec/controllers/maps_controller_spec.rb | 18 ------------- spec/controllers/metacodes_controller_spec.rb | 20 --------------- spec/controllers/synapses_controller_spec.rb | 25 ------------------- spec/controllers/topics_controller_spec.rb | 25 ------------------- 4 files changed, 88 deletions(-) diff --git a/spec/controllers/maps_controller_spec.rb b/spec/controllers/maps_controller_spec.rb index 3a8d3f0b..7c7a0499 100644 --- a/spec/controllers/maps_controller_spec.rb +++ b/spec/controllers/maps_controller_spec.rb @@ -22,13 +22,6 @@ RSpec.describe MapsController, type: :controller do end end - describe 'GET #edit' do - it 'assigns the requested map as @map' do - get :edit, { id: map.to_param } - expect(assigns(:map)).to eq(map) - end - end - describe 'POST #create' do context 'with valid params' do it 'creates a new Map' do @@ -54,11 +47,6 @@ RSpec.describe MapsController, type: :controller do post :create, { map: invalid_attributes } expect(assigns(:map)).to be_a_new(Map) end - - it "re-renders the 'new' template" do - post :create, { map: invalid_attributes } - expect(response).to render_template('new') - end end end @@ -94,12 +82,6 @@ RSpec.describe MapsController, type: :controller do { id: map.to_param, map: invalid_attributes } expect(assigns(:map)).to eq(map) end - - it "re-renders the 'edit' template" do - put :update, - { id: map.to_param, map: invalid_attributes } - expect(response).to render_template('edit') - end end end diff --git a/spec/controllers/metacodes_controller_spec.rb b/spec/controllers/metacodes_controller_spec.rb index 5f9a148e..b0b2a0ff 100644 --- a/spec/controllers/metacodes_controller_spec.rb +++ b/spec/controllers/metacodes_controller_spec.rb @@ -15,13 +15,6 @@ RSpec.describe MetacodesController, type: :controller do end end - describe 'GET #show' do - it 'assigns the requested metacode as @metacode' do - get :show, { id: metacode.to_param } - expect(assigns(:metacode)).to eq(metacode) - end - end - describe 'GET #new' do it 'assigns a new metacode as @metacode' do get :new, {} @@ -109,17 +102,4 @@ RSpec.describe MetacodesController, type: :controller do end end end - - describe 'DELETE #destroy' do - it 'destroys the requested metacode' do - expect do - delete :destroy, { id: metacode.to_param } - end.to change(Metacode, :count).by(-1) - end - - it 'redirects to the metacodes list' do - delete :destroy, { id: metacode.to_param } - expect(response).to redirect_to(metacodes_url) - end - end end diff --git a/spec/controllers/synapses_controller_spec.rb b/spec/controllers/synapses_controller_spec.rb index 90d70e8d..9b7471ab 100644 --- a/spec/controllers/synapses_controller_spec.rb +++ b/spec/controllers/synapses_controller_spec.rb @@ -8,13 +8,6 @@ RSpec.describe SynapsesController, type: :controller do sign_in end - describe 'GET #index' do - it 'assigns all synapses as @synapses' do - get :index, {} - expect(assigns(:synapses)).to eq([synapse]) - end - end - describe 'GET #show' do it 'assigns the requested synapse as @synapse' do get :show, { id: synapse.to_param } @@ -22,13 +15,6 @@ RSpec.describe SynapsesController, type: :controller do end end - describe 'GET #edit' do - it 'assigns the requested synapse as @synapse' do - get :edit, { id: synapse.to_param } - expect(assigns(:synapse)).to eq(synapse) - end - end - describe 'POST #create' do context 'with valid params' do it 'creates a new Synapse' do @@ -54,11 +40,6 @@ RSpec.describe SynapsesController, type: :controller do post :create, { synapse: invalid_attributes } expect(assigns(:synapse)).to be_a_new(Synapse) end - - it "re-renders the 'new' template" do - post :create, { synapse: invalid_attributes } - expect(response).to render_template('new') - end end end @@ -94,12 +75,6 @@ RSpec.describe SynapsesController, type: :controller do { id: synapse.to_param, synapse: invalid_attributes } expect(assigns(:synapse)).to eq(synapse) end - - it "re-renders the 'edit' template" do - put :update, - { id: synapse.to_param, synapse: invalid_attributes } - expect(response).to render_template('edit') - end end end diff --git a/spec/controllers/topics_controller_spec.rb b/spec/controllers/topics_controller_spec.rb index 5191c2fe..51610d33 100644 --- a/spec/controllers/topics_controller_spec.rb +++ b/spec/controllers/topics_controller_spec.rb @@ -8,13 +8,6 @@ RSpec.describe TopicsController, type: :controller do sign_in end - describe 'GET #index' do - it 'assigns all topics as @topics' do - get :index, {} - expect(assigns(:topics)).to eq([topic]) - end - end - describe 'GET #show' do it 'assigns the requested topic as @topic' do get :show, { id: topic.to_param } @@ -22,13 +15,6 @@ RSpec.describe TopicsController, type: :controller do end end - describe 'GET #edit' do - it 'assigns the requested topic as @topic' do - get :edit, { id: topic.to_param } - expect(assigns(:topic)).to eq(topic) - end - end - describe 'POST #create' do context 'with valid params' do it 'creates a new Topic' do @@ -54,11 +40,6 @@ RSpec.describe TopicsController, type: :controller do post :create, { topic: invalid_attributes } expect(assigns(:topic)).to be_a_new(Topic) end - - it "re-renders the 'new' template" do - post :create, { topic: invalid_attributes } - expect(response).to render_template('new') - end end end @@ -94,12 +75,6 @@ RSpec.describe TopicsController, type: :controller do { id: topic.to_param, topic: invalid_attributes } expect(assigns(:topic)).to eq(topic) end - - it "re-renders the 'edit' template" do - put :update, - { id: topic.to_param, topic: invalid_attributes } - expect(response).to render_template('edit') - end end end