mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 21:10:54 +00:00
758dfda988
Mostly tests
30 lines
692 B
Ruby
30 lines
692 B
Ruby
require 'rails_helper'
|
|
|
|
feature 'Server Administration' do
|
|
let!(:admin) { create :user, :admin }
|
|
|
|
background do
|
|
sign_in_as admin
|
|
end
|
|
|
|
scenario 'creating a server' do
|
|
visit servers_path
|
|
expect(page).to have_content('Listing Servers')
|
|
click_link 'New server'
|
|
test_server_creation_and_editing
|
|
visit servers_path
|
|
expect(page).to have_content Server.last.name
|
|
end
|
|
|
|
feature 'Server deletion' do
|
|
let!(:server) { create :server }
|
|
scenario 'deleting a server' do
|
|
visit servers_path
|
|
expect(page).to have_content(server.name)
|
|
visit server_path(server)
|
|
click_link 'Delete Server'
|
|
visit servers_path
|
|
expect(page).to_not have_content(server.name)
|
|
end
|
|
end
|
|
end
|