gaku 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -4
  3. data/VERSION +1 -1
  4. data/core/app/controllers/concerns/enrollments_controller.rb +1 -2
  5. data/core/app/controllers/gaku/contacts_controller.rb +3 -3
  6. data/core/app/controllers/gaku/notes_controller.rb +33 -24
  7. data/core/app/controllers/gaku/syllabuses_controller.rb +44 -16
  8. data/core/app/models/gaku/address.rb +1 -1
  9. data/core/app/models/gaku/class_group_enrollment.rb +4 -3
  10. data/core/app/models/gaku/contact.rb +2 -2
  11. data/core/app/models/gaku/grading_method_set.rb +1 -1
  12. data/core/app/views/gaku/class_groups/students/enroll_students.js.erb +6 -0
  13. data/core/app/views/gaku/contacts/_form_fields.html.slim +1 -1
  14. data/core/app/views/gaku/notes/create.js.erb +3 -3
  15. data/core/app/views/gaku/notes/destroy.js.erb +3 -3
  16. data/core/app/views/gaku/notes/edit.js.erb +1 -1
  17. data/core/app/views/gaku/notes/new.js.erb +1 -1
  18. data/core/app/views/gaku/notes/show.js.erb +1 -1
  19. data/core/app/views/gaku/notes/update.js.erb +2 -2
  20. data/core/app/views/gaku/syllabuses/_syllabus_fields.html.slim +2 -3
  21. data/core/app/views/gaku/syllabuses/_syllabuses.html.slim +1 -1
  22. data/core/app/views/gaku/syllabuses/create.js.erb +4 -3
  23. data/core/app/views/gaku/syllabuses/destroy.js.erb +1 -1
  24. data/core/app/views/gaku/syllabuses/{show.html.slim → edit.html.slim} +0 -0
  25. data/core/app/views/gaku/syllabuses/edit.js.erb +1 -1
  26. data/core/app/views/gaku/syllabuses/new.js.erb +1 -1
  27. data/core/app/views/gaku/syllabuses/update.js.erb +1 -1
  28. data/core/config/routes.rb +0 -8
  29. data/core/gaku_core.gemspec +15 -11
  30. data/core/lib/gaku/testing/factories/note_factory.rb +4 -0
  31. data/core/lib/gaku/testing/factories/syllabus_factory.rb +4 -0
  32. data/core/lib/gaku/testing/request_helpers.rb +5 -0
  33. data/core/spec/controllers/gaku/addresses_controller_spec.rb +1 -1
  34. data/core/spec/controllers/gaku/contacts_controller_spec.rb +83 -12
  35. data/core/spec/controllers/gaku/notes_controller_spec.rb +143 -0
  36. data/core/spec/controllers/gaku/syllabuses_controller_spec.rb +140 -0
  37. data/core/spec/requests/admin/achievements/achievements_spec.rb +1 -1
  38. data/core/spec/requests/admin/grading/grading_method_set_items_spec.rb +1 -1
  39. data/core/spec/requests/admin/grading/grading_method_sets_spec.rb +1 -1
  40. data/core/spec/requests/admin/grading/grading_methods_spec.rb +1 -1
  41. data/core/spec/requests/admin/roles_spec.rb +1 -1
  42. data/core/spec/requests/admin/school_years/school_years_spec.rb +1 -1
  43. data/core/spec/requests/admin/school_years/semesters_spec.rb +1 -1
  44. data/core/spec/requests/admin/schools/campuses/addresses_spec.rb +1 -1
  45. data/core/spec/requests/admin/schools/campuses/campuses_spec.rb +1 -1
  46. data/core/spec/requests/admin/schools/campuses/contacts_spec.rb +10 -22
  47. data/core/spec/requests/admin/schools/programs_spec.rb +1 -1
  48. data/core/spec/requests/admin/schools/school_levels_spec.rb +1 -1
  49. data/core/spec/requests/admin/schools/schools_spec.rb +1 -1
  50. data/core/spec/requests/admin/specialties_spec.rb +1 -1
  51. data/core/spec/requests/admin/templates_spec.rb +1 -1
  52. data/core/spec/requests/admin/types_and_methods/attendance_types_spec.rb +1 -1
  53. data/core/spec/requests/admin/types_and_methods/commute_method_types_spec.rb +1 -1
  54. data/core/spec/requests/admin/types_and_methods/contact_types_spec.rb +1 -1
  55. data/core/spec/requests/admin/types_and_methods/enrollment_statuses_spec.rb +1 -1
  56. data/core/spec/requests/admin/types_and_methods/states_spec.rb +1 -1
  57. data/core/spec/requests/admin/users_spec.rb +1 -1
  58. data/core/spec/requests/class_groups/class_groups_spec.rb +1 -1
  59. data/core/spec/requests/class_groups/notes_spec.rb +6 -13
  60. data/core/spec/requests/class_groups/semester_class_groups_spec.rb +1 -1
  61. data/core/spec/requests/course_groups/course_groups_spec.rb +1 -1
  62. data/core/spec/requests/courses/courses_spec.rb +1 -1
  63. data/core/spec/requests/courses/notes_spec.rb +6 -11
  64. data/core/spec/requests/courses/semester_courses_spec.rb +1 -1
  65. data/core/spec/requests/exams/exam_portions/attachments_spec.rb +1 -1
  66. data/core/spec/requests/exams/notes_spec.rb +6 -11
  67. data/core/spec/requests/students/achievements_spec.rb +1 -1
  68. data/core/spec/requests/students/contacts_spec.rb +7 -7
  69. data/core/spec/requests/students/guardians/contacts_spec.rb +9 -17
  70. data/core/spec/requests/students/notes_spec.rb +5 -9
  71. data/core/spec/requests/students/simple_grades_spec.rb +1 -1
  72. data/core/spec/requests/students/specialties_spec.rb +1 -1
  73. data/core/spec/requests/syllabuses/exams_spec.rb +5 -5
  74. data/core/spec/requests/syllabuses/notes_spec.rb +5 -10
  75. data/core/spec/requests/syllabuses/syllabuses_spec.rb +46 -85
  76. data/core/spec/requests/teachers/contacts_spec.rb +11 -19
  77. data/core/spec/requests/teachers/notes_spec.rb +5 -10
  78. data/core/spec/support/requests/shared_addresses_spec.rb +6 -2
  79. data/core/spec/support/requests/shared_contacts_spec.rb +19 -15
  80. data/core/spec/support/requests/shared_notes_spec.rb +36 -35
  81. data/gaku_dependencies.rb +1 -8
  82. metadata +9 -9
  83. data/core/app/controllers/gaku/assignments_controller.rb +0 -15
  84. data/core/spec/controllers/gaku/syllabuses/syllabuses_controller_spec.rb +0 -92
@@ -70,7 +70,7 @@ describe 'ClassGroup Semesters' do
70
70
 
71
71
  context 'edit', js: true do
72
72
  before do
73
- within(table) { click edit_link }
73
+ within(table) { click js_edit_link }
74
74
  wait_until_visible modal
75
75
  end
76
76
 
@@ -44,7 +44,7 @@ describe 'CourseGroups' do
44
44
 
45
45
  context '#edit', js: true do
46
46
  before do
47
- click edit_link
47
+ click js_edit_link
48
48
  wait_until_visible submit
49
49
  end
50
50
 
@@ -79,7 +79,7 @@ describe 'Courses' do
79
79
 
80
80
  context ' #edit ' do
81
81
  before do
82
- click edit_link
82
+ click js_edit_link
83
83
  page.should have_content('Edit Course')
84
84
  end
85
85
 
@@ -3,18 +3,15 @@ require 'spec_helper'
3
3
  describe 'Course Notes' do
4
4
 
5
5
  before { as :admin }
6
+ before(:all) { set_resource 'course-note' }
6
7
 
7
8
  let(:course) { create(:course) }
8
- let(:note) { create(:note, notable: course) }
9
-
10
- before :all do
11
- set_resource 'course-note'
12
- end
9
+ let(:course_with_note) { create(:course, :with_note) }
13
10
 
14
11
  context 'new', js: true, type: 'note' do
15
12
  before do
16
- visit gaku.course_path(course)
17
- @data = course
13
+ @resource = course
14
+ visit gaku.course_path(@resource)
18
15
  end
19
16
 
20
17
  it_behaves_like 'new note'
@@ -22,13 +19,11 @@ describe 'Course Notes' do
22
19
 
23
20
  context 'existing', js: true, type: 'note' do
24
21
  before do
25
- note
26
- visit gaku.course_path(course)
27
- @data = course
22
+ @resource = course_with_note
23
+ visit gaku.course_path(@resource)
28
24
  end
29
25
 
30
26
  it_behaves_like 'edit note'
31
-
32
27
  it_behaves_like 'delete note'
33
28
  end
34
29
 
@@ -71,7 +71,7 @@ describe 'Course Semesters' do
71
71
 
72
72
  context 'edit', js: true do
73
73
  before do
74
- within(table) { click edit_link }
74
+ within(table) { click js_edit_link }
75
75
  wait_until_visible modal
76
76
  end
77
77
 
@@ -55,7 +55,7 @@ describe 'Exam Portion Attachments' do
55
55
 
56
56
  context '#edit' do
57
57
  before do
58
- within(table) { click edit_link }
58
+ within(table) { click js_edit_link }
59
59
  end
60
60
 
61
61
  xit 'edits' do
@@ -3,18 +3,15 @@ require 'spec_helper'
3
3
  describe 'Exam Notes' do
4
4
 
5
5
  before { as :admin }
6
+ before(:all) { set_resource 'exam-note' }
6
7
 
7
8
  let(:exam) { create(:exam) }
8
- let(:note) { create(:note, notable: exam) }
9
-
10
- before :all do
11
- set_resource 'exam-note'
12
- end
9
+ let(:exam_with_note) { create(:exam, :with_note) }
13
10
 
14
11
  context 'new', js: true, type: 'note' do
15
12
  before do
16
- visit gaku.exam_path(exam)
17
- @data = exam
13
+ @resource = exam
14
+ visit gaku.exam_path(@resource)
18
15
  end
19
16
 
20
17
  it_behaves_like 'new note'
@@ -22,13 +19,11 @@ describe 'Exam Notes' do
22
19
 
23
20
  context 'existing', js: true, type: 'note' do
24
21
  before do
25
- note
26
- visit gaku.exam_path(exam)
27
- @data = exam
22
+ @resource = exam_with_note
23
+ visit gaku.exam_path(@resource)
28
24
  end
29
25
 
30
26
  it_behaves_like 'edit note'
31
-
32
27
  it_behaves_like 'delete note'
33
28
  end
34
29
 
@@ -51,7 +51,7 @@ describe 'Student Achievements' do
51
51
 
52
52
  context '#edit' do
53
53
  before do
54
- within(table) { click edit_link }
54
+ within(table) { click js_edit_link }
55
55
  end
56
56
 
57
57
  it 'edits' do
@@ -14,8 +14,8 @@ describe 'Student Contacts' do
14
14
  context 'new', js: true, type: 'contact' do
15
15
 
16
16
  before do
17
- @data = student
18
- visit gaku.edit_student_path(@data)
17
+ @resource = student
18
+ visit gaku.edit_student_path(@resource)
19
19
  click tab_link
20
20
  wait_until { has_content? 'Contacts list' }
21
21
  end
@@ -28,18 +28,18 @@ describe 'Student Contacts' do
28
28
 
29
29
  context 'one contact' do
30
30
 
31
- before { @data = student_with_contact }
31
+ before { @resource = student_with_contact }
32
32
 
33
33
  context 'edit', js: true do
34
34
 
35
35
  before do
36
- visit gaku.edit_student_path(@data)
36
+ visit gaku.edit_student_path(@resource)
37
37
  click tab_link
38
38
  wait_until { has_content? 'Contacts list' }
39
39
  end
40
40
 
41
41
  it_behaves_like 'edit contact'
42
- it_behaves_like 'delete contact', @data
42
+ it_behaves_like 'delete contact', @resource
43
43
  end
44
44
 
45
45
  end
@@ -47,8 +47,8 @@ describe 'Student Contacts' do
47
47
  context 'two contacts', type: 'contact' do
48
48
 
49
49
  before do
50
- @data = student_with_contacts
51
- visit gaku.edit_student_path(@data)
50
+ @resource = student_with_contacts
51
+ visit gaku.edit_student_path(@resource)
52
52
  click tab_link
53
53
  wait_until { has_content? 'Contacts list' }
54
54
  end
@@ -3,6 +3,7 @@ require 'spec_helper'
3
3
  describe 'Student Guardian Contacts' do
4
4
 
5
5
  before { as :admin }
6
+ before(:all) { set_resource 'student-guardian-contact' }
6
7
 
7
8
  let(:student) { create(:student) }
8
9
  let(:guardian) { create(:guardian) }
@@ -12,17 +13,12 @@ describe 'Student Guardian Contacts' do
12
13
 
13
14
  tab_link = '#student-guardian-contacts-tab-link'
14
15
 
15
- before :all do
16
- set_resource 'student-guardian-contact'
17
- end
18
-
19
-
20
16
  context 'new', js: true, type: 'contact' do
21
17
  before(:each) do
22
18
  contact_type
23
19
  student.guardians << guardian
24
20
  visit gaku.edit_student_path(student)
25
- @data = guardian
21
+ @resource = guardian
26
22
  click '#student-guardians-tab-link'
27
23
  wait_until { page.has_content? 'Guardians list' }
28
24
  click edit_link
@@ -36,27 +32,23 @@ describe 'Student Guardian Contacts' do
36
32
  context 'existing', js: true, type: 'contact' do
37
33
 
38
34
  context 'one contact' do
39
-
40
35
  before do
41
- @data = guardian_with_contact
42
- student.guardians << @data
43
- visit gaku.edit_student_guardian_path(student, @data)
36
+ @resource = guardian_with_contact
37
+ student.guardians << @resource
38
+ visit gaku.edit_student_guardian_path(student, @resource)
44
39
  click tab_link
45
40
  end
46
41
 
47
-
48
42
  it_behaves_like 'edit contact'
49
-
50
- it_behaves_like 'delete contact', @data
51
-
43
+ it_behaves_like 'delete contact', @resource
52
44
  end
53
45
 
54
46
  context 'two contacts', type: 'contact' do
55
47
 
56
48
  before do
57
- @data = guardian_with_contacts
58
- student.guardians << @data
59
- visit gaku.edit_student_guardian_path(student, @data)
49
+ @resource = guardian_with_contacts
50
+ student.guardians << @resource
51
+ visit gaku.edit_student_guardian_path(student, @resource)
60
52
  click tab_link
61
53
  end
62
54
 
@@ -3,19 +3,16 @@ require 'spec_helper'
3
3
  describe 'Student Notes' do
4
4
 
5
5
  before { as :admin }
6
+ before(:all) { set_resource 'student-note' }
6
7
 
7
8
  let(:student) { create(:student) }
8
9
  let(:student_with_note) { create(:student, :with_note) }
9
10
  let(:note) { create(:note, notable: student) }
10
11
 
11
- before :all do
12
- set_resource 'student-note'
13
- end
14
-
15
12
  context 'new', type: 'note' do
16
13
  before do
17
- @data = student
18
- visit gaku.edit_student_path(@data)
14
+ @resource = student
15
+ visit gaku.edit_student_path(@resource)
19
16
  click tab_link
20
17
  end
21
18
 
@@ -24,13 +21,12 @@ describe 'Student Notes' do
24
21
 
25
22
  context 'existing', js: true, type: 'note' do
26
23
  before do
27
- @data = student_with_note
28
- visit gaku.edit_student_path(@data)
24
+ @resource = student_with_note
25
+ visit gaku.edit_student_path(@resource)
29
26
  click tab_link
30
27
  end
31
28
 
32
29
  it_behaves_like 'edit note'
33
-
34
30
  it_behaves_like 'delete note'
35
31
  end
36
32
 
@@ -50,7 +50,7 @@ describe 'Student Simple Grades' do
50
50
 
51
51
  context '#edit' do
52
52
  before do
53
- within(table) { click edit_link }
53
+ within(table) { click js_edit_link }
54
54
  end
55
55
 
56
56
  it 'edits' do
@@ -54,7 +54,7 @@ describe 'Student Specialties' do
54
54
 
55
55
  context '#edit' do
56
56
  before do
57
- within(table) { click edit_link }
57
+ within(table) { click js_edit_link }
58
58
  end
59
59
 
60
60
  it 'edits' do
@@ -24,7 +24,7 @@ describe 'Syllabus Exams' do
24
24
  syllabus
25
25
  visit gaku.syllabuses_path
26
26
 
27
- within('#syllabuses-index tbody tr:nth-child(1)') { click show_link }
27
+ within('#syllabuses-index tbody tr:nth-child(1)') { click edit_link }
28
28
  page.should have_content 'No Exams'
29
29
  end
30
30
 
@@ -58,7 +58,7 @@ describe 'Syllabus Exams' do
58
58
  before do
59
59
  syllabus
60
60
  visit gaku.syllabuses_path
61
- within('#syllabuses-index tbody tr:nth-child(1)') { click show_link }
61
+ within('#syllabuses-index tbody tr:nth-child(1)') { click edit_link }
62
62
  page.should have_content 'No Exams'
63
63
  click new_link
64
64
  wait_until_visible submit
@@ -95,11 +95,11 @@ describe 'Syllabus Exams' do
95
95
  context 'created exam' do
96
96
  before do
97
97
  syllabus.exams << exam
98
- visit gaku.syllabus_path(syllabus)
98
+ visit gaku.edit_syllabus_path(syllabus)
99
99
  end
100
100
 
101
101
  it 'edits', js: true do
102
- click edit_link
102
+ click js_edit_link
103
103
  wait_until_visible modal
104
104
 
105
105
  fill_in 'exam_name', with: 'Ruby Exam'
@@ -137,7 +137,7 @@ describe 'Syllabus Exams' do
137
137
  before do
138
138
  syllabus
139
139
  visit gaku.syllabuses_path
140
- within('#syllabuses-index tbody tr:nth-child(1)') { click show_link }
140
+ within('#syllabuses-index tbody tr:nth-child(1)') { click edit_link }
141
141
  end
142
142
 
143
143
  it 'clicking on new-existing-exam-link hides new-exam form', js: true do
@@ -3,19 +3,15 @@ require 'spec_helper'
3
3
  describe 'Syllabus Notes' do
4
4
 
5
5
  before { as :admin }
6
+ before(:all) { set_resource 'syllabus-note' }
6
7
 
7
8
  let(:syllabus) { create(:syllabus) }
8
9
  let(:syllabus_with_note) { create(:syllabus, :with_note) }
9
- let(:note) { create(:note) }
10
-
11
- before :all do
12
- set_resource 'syllabus-note'
13
- end
14
10
 
15
11
  context 'new', js: true do
16
12
  before do
17
- @data = syllabus
18
- visit gaku.syllabus_path(@data)
13
+ @resource = syllabus
14
+ visit gaku.edit_syllabus_path(@resource)
19
15
  end
20
16
 
21
17
  it_behaves_like 'new note'
@@ -23,12 +19,11 @@ describe 'Syllabus Notes' do
23
19
 
24
20
  context 'existing', js: true do
25
21
  before do
26
- @data = syllabus_with_note
27
- visit gaku.syllabus_path(@data)
22
+ @resource = syllabus_with_note
23
+ visit gaku.edit_syllabus_path(@resource)
28
24
  end
29
25
 
30
26
  it_behaves_like 'edit note'
31
-
32
27
  it_behaves_like 'delete note'
33
28
  end
34
29
 
@@ -3,14 +3,11 @@ require 'spec_helper'
3
3
  describe 'Syllabus' do
4
4
 
5
5
  before { as :admin }
6
+ before(:all) { set_resource 'syllabus' }
6
7
 
7
8
  let(:syllabus) { create(:syllabus, name: 'Biology', code: 'bio') }
8
9
 
9
- before do
10
- set_resource 'syllabus'
11
- end
12
-
13
- context '#new ', js: true do
10
+ context 'new', js: true do
14
11
 
15
12
  before do
16
13
  visit gaku.syllabuses_path
@@ -19,7 +16,6 @@ describe 'Syllabus' do
19
16
  end
20
17
 
21
18
  it 'creates' do
22
- tr_count = size_of(table_rows)
23
19
  expect do
24
20
  fill_in 'syllabus_name', with: 'Syllabus1'
25
21
  fill_in 'syllabus_code', with: 'code1'
@@ -28,116 +24,81 @@ describe 'Syllabus' do
28
24
  wait_until_invisible submit
29
25
  end.to change(Gaku::Syllabus, :count).by 1
30
26
 
31
- page.find(new_link).visible?
32
- size_of(table_rows).should eq tr_count+1
33
- end
34
-
35
- it {has_validations?}
36
-
37
- it 'cancels adding' do
38
- ensure_cancel_creating_is_working
27
+ has_content? 'Syllabus1'
28
+ has_content? 'code1'
29
+ count? '1'
39
30
  end
40
31
 
32
+ it { has_validations? }
41
33
  end
42
34
 
43
35
  context 'existing' do
44
36
 
45
- before do
46
- syllabus
47
- visit gaku.syllabuses_path
48
- end
49
-
50
- context 'lists' do
37
+ before { syllabus }
51
38
 
52
- it 'lists existing syllabuses' do
53
- page.should have_content('List Syllabuses')
39
+ context 'edit', js: true do
54
40
 
55
- within(table) do
56
- page.should have_content('Biology')
57
- page.should have_content('bio')
58
- end
59
- size_of(table_rows).should eq 2
60
- end
41
+ context 'from edit view' do
42
+ xit 'edits' do
43
+ visit gaku.edit_syllabus_path(syllabus)
61
44
 
62
- it 'shows' do
63
- within(table) { click show_link }
64
- current_path.should == "/syllabuses/#{syllabus.id}"
65
- end
45
+ fill_in 'syllabus_name', with: 'Maths'
46
+ fill_in 'syllabus_code', with: 'math'
47
+ fill_in 'syllabus_description', with: 'Maths Description'
66
48
 
67
- end
49
+ click submit
50
+ flash_updated?
68
51
 
69
- context '#edit ', js: true do
52
+ has_content? 'Maths'
53
+ has_content? 'math'
70
54
 
71
- before do
72
- syllabus
73
- click edit_link
74
- wait_until_visible modal
75
- end
55
+ has_no_content? 'Biology'
56
+ has_no_content? 'bio'
76
57
 
77
- it 'has validations' do
78
- fill_in 'syllabus_name', with: ''
79
- has_validations?
58
+ expect(syllabus.reload.name).to eq 'Maths'
59
+ end
80
60
  end
81
61
 
82
- it 'edits' do
83
- fill_in 'syllabus_name', with: 'Maths'
84
- fill_in 'syllabus_code', with: 'math'
85
- fill_in 'syllabus_description', with: 'Maths Description'
86
-
87
- click submit
88
-
89
- page.should have_content('Maths')
90
- page.should have_content('math')
91
-
92
- page.should_not have_content 'Biology'
93
- page.should_not have_content 'bio'
94
-
95
- edited_syllabus = Gaku::Syllabus.last
96
- edited_syllabus.name.should eq 'Maths'
97
- edited_syllabus.code.should eq 'math'
98
- edited_syllabus.description.should eq 'Maths Description'
99
- flash_updated?
100
- end
62
+ context 'from index view' do
63
+ before do
64
+ visit gaku.syllabuses_path
65
+ click js_edit_link
66
+ wait_until_visible modal
67
+ end
101
68
 
102
- it 'cancels editting' do
103
- ensure_cancel_modal_is_working
104
- end
69
+ it 'edits from index' do
70
+ fill_in 'syllabus_name', with: 'Maths'
71
+ fill_in 'syllabus_code', with: 'math'
72
+ fill_in 'syllabus_description', with: 'Maths Description'
105
73
 
106
- it 'edits from show view' do
107
- visit gaku.syllabus_path(syllabus)
108
- click edit_link
109
- wait_until_visible modal
74
+ click submit
110
75
 
111
- fill_in 'syllabus_name', with: 'Maths'
112
- fill_in 'syllabus_code', with: 'math'
113
- fill_in 'syllabus_description', with: 'Maths Description'
76
+ flash_updated?
114
77
 
115
- click submit
78
+ has_content? 'Maths'
79
+ has_content? 'math'
116
80
 
117
- page.should have_content('Maths')
118
- page.should have_content('math')
81
+ has_no_content? 'Biology'
82
+ has_no_content? 'bio'
119
83
 
120
- page.should_not have_content 'Biology'
121
- page.should_not have_content 'bio'
84
+ expect(syllabus.reload.name).to eq 'Maths'
85
+ end
122
86
 
123
- edited_syllabus = Gaku::Syllabus.last
124
- edited_syllabus.name.should eq 'Maths'
125
- edited_syllabus.code.should eq 'math'
126
- edited_syllabus.description.should eq 'Maths Description'
127
- flash_updated?
87
+ it 'has validations' do
88
+ fill_in 'syllabus_name', with: ''
89
+ has_validations?
90
+ end
128
91
  end
129
92
  end
130
93
 
131
- it 'deletes', js: true do
94
+ xit 'deletes', js: true do
132
95
 
133
96
  expect do
134
97
  ensure_delete_is_working
135
98
  end.to change(Gaku::Syllabus, :count).by -1
136
99
 
137
- page.should_not have_content("#{syllabus.code}")
138
-
100
+ has_no_content?("#{syllabus.code}")
139
101
  end
140
102
 
141
103
  end
142
-
143
104
  end