Commit be792220 authored by Volodymyr Mostepaniuk's avatar Volodymyr Mostepaniuk
Browse files

Issue #3311359 by mostepaniukvm, fago: Add initial test coverage

parent ad9c3913
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -54,6 +54,22 @@ class LupusDecoupledApiResponseTest extends BrowserTestBase {
    $this->nodePath = 'ce-api/node/' . $this->node->id();
  }

  /**
   * Tests if created node is accessible.
   */
  public function testExistingPageResponse() {
    $this->drupalGet('node/' . $this->node->id());
    $this->assertSession()->statusCodeEquals(200);
  }

  /**
   * Tests un-existing page access.
   */
  public function test404Page() {
    $this->drupalGet('i-dont-exist');
    $this->assertSession()->statusCodeEquals(404);
  }

  /**
   * Tests if created node is accessible at api endpoint.
   */