From dd88cff6e6e0087b9dadc0537aed9a57cbb2c2c7 Mon Sep 17 00:00:00 2001 From: mateuszurbanowicz Date: Wed, 2 Dec 2015 15:19:56 +0100 Subject: [PATCH] fix tests --- tests/functional/ContentCest.php | 41 +++++--------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/tests/functional/ContentCest.php b/tests/functional/ContentCest.php index 546d4d93..24693feb 100644 --- a/tests/functional/ContentCest.php +++ b/tests/functional/ContentCest.php @@ -39,7 +39,7 @@ public function canUseArticleBreadcrumbs(FunctionalTester $I) 'translations' => [ 'title' => 'lorem ipsum', 'langCode' => 'en', - 'isActive' => 1 + 'isActive' => 1 ] ], $user @@ -128,7 +128,7 @@ public function seeStickyContentOnTopOfTheList(FunctionalTester $I) 'translations' => [ 'langCode' => 'en', 'title' => 'This content is sticky.', - 'isActive' => 1 + 'isActive' => 1 ] ] ); @@ -141,7 +141,7 @@ public function seeStickyContentOnTopOfTheList(FunctionalTester $I) 'translations' => [ 'langCode' => 'en', 'title' => 'And this is not.', - 'isActive' => 1 + 'isActive' => 1 ] ] ); @@ -167,7 +167,7 @@ public function seePromotedContentOnTopOfTheList(FunctionalTester $I) 'translations' => [ 'langCode' => 'en', 'title' => 'This content is promoted.', - 'isActive' => 1 + 'isActive' => 1 ] ] ); @@ -180,7 +180,7 @@ public function seePromotedContentOnTopOfTheList(FunctionalTester $I) 'translations' => [ 'langCode' => 'en', 'title' => 'And this is not', - 'isActive' => 1 + 'isActive' => 1 ] ] ); @@ -238,23 +238,6 @@ public function canSeeNotPublishedCategoryAsAdmin(FunctionalTester $I) $I->see('This content is not published.'); } - - public function canSeeArticleInNotPublishedCategoryAsAdmin(FunctionalTester $I) - { - $category = $I->haveContent(['type' => 'category', 'isActive' => 1]); - $content = $I->haveContent(['type' => 'content', 'isActive' => 1, 'parentId' => $category->id]); - $contentRoute = '/' . $content->route->translations[0]['langCode'] . '/' . $content->route->translations[0]['url']; - - $I->wantTo('see article in not published category as admin'); - $I->loginAsAdmin(); - $I->amOnPage($contentRoute); - $I->seeResponseCodeIs(200); - - $I->see($content->translations[0]->title); - $I->see('This content is not published.'); - } - - public function cantSeeNotPublishedCategoryAsUser(FunctionalTester $I) { $category = $I->haveContent(['type' => 'category', 'isActive' => 0]); @@ -265,18 +248,6 @@ public function cantSeeNotPublishedCategoryAsUser(FunctionalTester $I) $I->seeResponseCodeIs(404); } - - public function cantSeeArticleInNotPublishedCategoryAsRegularUser(FunctionalTester $I) - { - $category = $I->haveContent(['type' => 'category', 'isActive' => 0]); - $content = $I->haveContent(['type' => 'content', 'isActive' => 1, 'parentId' => $category->id]); - $contentRoute = '/' . $content->route->translations[0]['langCode'] . '/' . $content->route->translations[0]['url']; - - $I->wantTo('cant see article in not published category as regular user'); - $I->amOnPage($contentRoute); - $I->seeResponseCodeIs(404); - } - public function canUsePagination(FunctionalTester $I) { $category = $I->haveContent(['type' => 'category', 'isActive' => 1]); @@ -298,7 +269,7 @@ public function canUsePagination(FunctionalTester $I) $I->seeResponseCodeIs(200); $I->click('2'); - $I->canSeeCurrentUrlEquals($route.'?page=2'); + $I->canSeeCurrentUrlEquals($route . '?page=2'); } }