fix course creation
which was left behind as administrate was dumped
This commit is contained in:
parent
b67691b339
commit
7c221455bc
|
@ -1,10 +1,13 @@
|
|||
%h2.courses_edit_start
|
||||
= params["action"].upcase
|
||||
Course
|
||||
= bootstrap_form_for([:admin , @course]) do |f|
|
||||
.row
|
||||
= f.text_field :name
|
||||
= simple_form_for([:admin , @course]) do |f|
|
||||
= f.error_notification
|
||||
.form-inputs
|
||||
= f.input :name
|
||||
= f.input :extra
|
||||
= f.input :start
|
||||
|
||||
.form-actions
|
||||
= f.submit :class => "btn btn-success"
|
||||
= link_to t(:back), courses_path, :class => "btn btn-warning"
|
||||
.courses_edit_end
|
||||
= f.button :submit
|
||||
= link_to "Back", admin_courses_path, :class => "btn btn-warning"
|
||||
|
|
|
@ -11,4 +11,12 @@ describe "Admin Course" do
|
|||
course = create(:course)
|
||||
visit_url admin_course_url(course)
|
||||
end
|
||||
|
||||
it "creates a course" do
|
||||
visit_url new_admin_course_url
|
||||
fill_in 'course_name', :with => 'kaksi'
|
||||
click_button 'Create Course'
|
||||
expect(page).to have_content("Course created")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue