Convert specs to tests

This commit is contained in:
Artur Beljajev 2017-11-22 04:35:06 +02:00
parent 61b6df197e
commit 93b0037c39
6 changed files with 48 additions and 60 deletions

View file

@ -2,16 +2,16 @@ require 'test_helper'
class EditRegistrarTest < ActionDispatch::IntegrationTest
def setup
login_as create(:admin_user)
login_as users(:admin)
@registrar = registrars(:valid)
end
def test_updates_registrar
registrar = create(:registrar)
visit admin_registrar_path(registrar)
visit admin_registrar_path(@registrar)
click_link_or_button 'Edit'
click_link_or_button 'Update registrar'
assert_current_path admin_registrar_path(@registrar)
assert_text 'Registrar has been successfully updated'
end
end

View file

@ -0,0 +1,15 @@
require 'test_helper'
class ShowRegistrarTest < ActionDispatch::IntegrationTest
include ActionView::Helpers::NumberHelper
def setup
login_as users(:admin)
@registrar = registrars(:complete)
visit admin_registrar_path(@registrar)
end
def test_accounting_customer_code
assert_text 'ACCOUNT001'
end
end