Do not allow to permanently remove a zone

#522
This commit is contained in:
Artur Beljajev 2017-05-23 17:23:05 +03:00
parent 64f6e07a20
commit 35267820f9
6 changed files with 2 additions and 58 deletions

View file

@ -1,18 +0,0 @@
require 'rails_helper'
RSpec.describe 'admin zone destroy', settings: false do
let!(:zone) { create(:zone) }
before :example do
sign_in_to_admin_area
end
it 'deletes zone' do
expect { delete admin_zone_path(zone) }.to change { DNS::Zone.count }.from(1).to(0)
end
it 'redirects to :index' do
delete admin_zone_path(zone)
expect(response).to redirect_to admin_zones_url
end
end