Skip to content

Commit b83c57c

Browse files
author
rtschu
committed
fixed Feature name, fixed duplicated code
1 parent 58b3251 commit b83c57c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/behat/test_search.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@mod @mod_moodleoverflow @mod_moodleoverflow_search
2-
Feature: Add moodleoverflow activities and discussions
2+
Feature: Search moodle for moodleoverflow discussions
33
In order to find discussions
44
I need to be able to search them
55

@@ -59,4 +59,4 @@ Feature: Add moodleoverflow activities and discussions
5959
And I fill in "id_q" with "Forum post 1"
6060
And I press "id_submitbutton"
6161
Then I should not see "Forum post 1"
62-
And I should not see "This is the body"
62+
And I should not see "This is the body"

tests/search_test.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,15 @@ public function test_deleted_post() {
133133
public function test_forbidden_discussion() {
134134
global $CFG;
135135
$this->resetAfterTest();
136+
136137
$CFG->enableglobalsearch = 1;
137138

138139
$course = $this->getDataGenerator()->create_course();
139-
$moodleoverflow = $this->getDataGenerator()->create_module("moodleoverflow", array("course" => $course));
140140
$moodleoverflowgen = $this->getDataGenerator()->get_plugin_generator('mod_moodleoverflow');
141+
$moodleoverflow = $this->getDataGenerator()->create_module("moodleoverflow", array("course" => $course));
141142
$user = $this->getDataGenerator()->create_user();
142-
$user2 = $this->getDataGenerator()->create_user();
143143
$this->getDataGenerator()->enrol_user($user->id, $course->id);
144+
$user2 = $this->getDataGenerator()->create_user();
144145
$this->setUser($user2);
145146

146147
[$discussion, $post] = $moodleoverflowgen->post_to_forum($moodleoverflow, $user);

0 commit comments

Comments
 (0)