-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from abdullahallmehedi/49758_RSpec_for_Supervi…
…sor_Course_View_for_start_course_feature RSpec for Supervisor Course View for start course feature 49758
- Loading branch information
Showing
3 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require "rails_helper" | ||
|
||
feature "Start course" do | ||
subject {page} | ||
let(:supervisor) {FactoryGirl.create :supervisor} | ||
let!(:course){FactoryGirl.create :course, user_ids: [supervisor.id]} | ||
before :each do | ||
login_as supervisor, scope: :user | ||
visit supervisor_course_path course | ||
end | ||
|
||
scenario "has update status field" do | ||
is_expected.to have_selector "input#course_update_status", visible: false | ||
end | ||
scenario "has submit button" do | ||
is_expected.to have_button I18n.t "supervisor.courses.show.start" | ||
end | ||
scenario "edit course feature", js: true do | ||
click_button I18n.t "supervisor.courses.show.start" | ||
is_expected.to have_text I18n.t("supervisor.courses.update.success", action: | ||
"Started") | ||
end | ||
end |