Ejemplo n.º 1
0
 public function testEmailFollowers(\FunctionalTester $I)
 {
     $I->wantTo('check that email notifications are sent when a project is updated');
     // first follow project
     IndexPage::openBy($I);
     $I->sendAjaxPostRequest(IndexPage::getFollowLink(\Project::$id));
     // update project
     $I->cleanDir($I->getEmailDir());
     self::testValidDetails($I);
     $I->seeFileFound('*.eml', $I->getEmailDir());
     $I->openFile($I->getFirstEmailPath());
     $I->seeInThisFile(\Email::$followSubject);
     $I->seeInThisFile(\Email::$followText);
     $I->seeInThisFile(\Email::$followLink);
 }
Ejemplo n.º 2
0
 public function testUnfollowProject(\FunctionalTester $I)
 {
     $I->wantTo('check that Unfollow button works');
     self::testFollowProject($I);
     $I->sendAjaxPostRequest(IndexPage::getUnfollowLink(\Project::$id));
     IndexPage::openBy($I);
     $I->dontSeeRecord('app\\models\\ProjectFollowers', ['projectID' => \Project::$id, 'usersFollowing' => \Yii::$app->getUser()->getId()]);
     $I->seeLink(IndexPage::$followButtonText, IndexPage::getFollowLink(\Project::$id));
     $I->dontSeeLink(IndexPage::$unfollowButtonText, IndexPage::getUnfollowLink(\Project::$id));
 }