Skip to content

Commit ca3c39b

Browse files
committed
fix: RSpec
1 parent 18710c5 commit ca3c39b

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
*= require jquery-ui/datepicker
33
*= require jquery-ui/slider
4-
*= require jquery.timepicker
54
*= require_self
65
*/

app/views/admin/base/_flash.html.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.clearfix
22
- flash.each do |k, message|
33
- k = 'danger' if k.to_s == 'error'
4-
div.alert-dismissible.alert.fade.in class= "alert-#{k}"
4+
div.alert-dismissible.alert.fade.in class="alert-#{k}"
55
button.close type="button" data-dismiss="alert" aria-label="Close"
66
span aria-hidden="true" x
77
= message
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- content_for :btns do
22
= render partial: "btns", object: @category, as: :category
33

4-
= admin_widget_box "Edit Category", icon: :pencil do
4+
= admin_widget_box "Edit Category" do
55
= simple_form_for @category, as: :category, wrapper: :admin do |f|
66
= render partial: "form", object: f, as: :f

app/views/admin/categories/index.html.slim

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
= admin_widget_box "Filtering", icon: :pencil do
1+
= admin_widget_box "Filtering" do
22
= render partial: "filtering", as: :q, object: @q
3-
= admin_widget_box "Categories", icon: :pencil do
3+
= admin_widget_box "Categories" do
44
.dataTables_wrapper
55
div
66
.dataTables_length
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
= admin_widget_box "New Category", icon: :pencil do
1+
= admin_widget_box "New Category" do
22
= simple_form_for @category, as: :category, wrapper: :admin do |f|
33
= render partial: "form", object: f, as: :f

app/views/admin/categories/revisions.html.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- content_for :btns do
22
= render partial: "btns", object: @category, as: :category
33

4-
= admin_widget_box "Revisions ( total results: #{@versions.size} )", icon: :pencil do
4+
= admin_widget_box "Revisions ( total results: #{@versions.size} )" do
55
.dataTables_wrapper
66
div
77
.dataTables_length

app/views/admin/categories/show.html.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- content_for :btns do
22
= render partial: "btns", object: @category, as: :category
3-
= admin_widget_box "Category ##{@category.id}", icon: :th do
3+
= admin_widget_box "Category ##{@category.id}" do
44
table.table.table-bordered.table-striped.table-hover
55
tbody
66
tr

spec/support/html_matchers.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def response_meta_canonical
1818
end
1919

2020
def response_flash_message(klass = nil)
21-
response.body.scan(/(<div class=\"alert fade in alert-#{klass}\">)/)[0][0]
21+
klass = 'danger' if klass.to_s == 'error'
22+
response.body.scan(/(<div class=\".*alert-#{klass}.*\">)/)[0][0]
2223
rescue
2324
''
2425
end

0 commit comments

Comments
 (0)