mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
* Create new class called ApplicationIntegrationTest, so we don't have to override ActionDispatch::IntegrationTest * Move UI tests to inherit from ApplicationSystemTestCase * Existing REST API or EPP tests inherit from ApplicationIntegrationTest. * Move `require 'application_system_test_case'` at the end of `test_helper` I don't particularly agree with the Rails' convention of treating UI tests as system tests and API tests as integration tests, but I see no benefit in actively fighting against it.
16 lines
448 B
Ruby
16 lines
448 B
Ruby
require 'test_helper'
|
|
|
|
class AdminAreaDomainDetailsTest < ApplicationSystemTestCase
|
|
setup do
|
|
sign_in users(:admin)
|
|
@domain = domains(:shop)
|
|
end
|
|
|
|
def test_discarded_domain_has_corresponding_label
|
|
visit admin_domain_url(@domain)
|
|
assert_no_css 'span.label.label-warning', text: 'deleteCandidate'
|
|
@domain.discard
|
|
visit admin_domain_url(@domain)
|
|
assert_css 'span.label.label-warning', text: 'deleteCandidate'
|
|
end
|
|
end
|