mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 11:19:39 +02:00
Convert specs to tests
This commit is contained in:
parent
61b6df197e
commit
93b0037c39
6 changed files with 48 additions and 60 deletions
|
@ -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
|
||||
|
|
15
test/integration/admin/registrars/show_registrar_test.rb
Normal file
15
test/integration/admin/registrars/show_registrar_test.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue