You are here

public function CommerceExchangerTest::testCommerceExchangerCreationDisabled in Commerce Exchanger 8

Tests adding a exchange rate without enough currencies.

File

tests/src/FunctionalJavascript/CommerceExchangerTest.php, line 115

Class

CommerceExchangerTest
Tests the commerce exchanger UI.

Namespace

Drupal\Tests\commerce_exchanger\FunctionalJavascript

Code

public function testCommerceExchangerCreationDisabled() {
  $hrk = Currency::load('HRK');
  $hrk
    ->delete();
  $this
    ->drupalGet('admin/commerce/config/exchange-rates');
  $this
    ->getSession()
    ->getPage()
    ->clickLink('Add Exchange rates');
  $this
    ->assertSession()
    ->pageTextContains(t('Minimum of two currencies needs to be enabled, to be able to add exchange rates'));
}