|
|
@ -201,6 +201,10 @@ RSpec.describe CaseLogsController, type: :request do |
|
|
|
it "does not show the pagination result line" do |
|
|
|
it "does not show the pagination result line" do |
|
|
|
expect(CGI.unescape_html(response.body)).not_to match("Showing <b>1</b> to <b>20</b> of <b>26</b> logs") |
|
|
|
expect(CGI.unescape_html(response.body)).not_to match("Showing <b>1</b> to <b>20</b> of <b>26</b> logs") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not have pagination in the title" do |
|
|
|
|
|
|
|
expect(page).to have_title("Logs") |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when there are more than 20 logs" do |
|
|
|
context "when there are more than 20 logs" do |
|
|
@ -223,6 +227,10 @@ RSpec.describe CaseLogsController, type: :request do |
|
|
|
it "shows which logs are being shown on the current page" do |
|
|
|
it "shows which logs are being shown on the current page" do |
|
|
|
expect(CGI.unescape_html(response.body)).to match("Showing <b>1</b> to <b>20</b> of <b>26</b> logs") |
|
|
|
expect(CGI.unescape_html(response.body)).to match("Showing <b>1</b> to <b>20</b> of <b>26</b> logs") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "has pagination in the title" do |
|
|
|
|
|
|
|
expect(page).to have_title("Logs (page 1 of 2)") |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when on the second page" do |
|
|
|
context "when on the second page" do |
|
|
@ -244,6 +252,10 @@ RSpec.describe CaseLogsController, type: :request do |
|
|
|
it "shows which logs are being shown on the current page" do |
|
|
|
it "shows which logs are being shown on the current page" do |
|
|
|
expect(CGI.unescape_html(response.body)).to match("Showing <b>21</b> to <b>26</b> of <b>26</b> logs") |
|
|
|
expect(CGI.unescape_html(response.body)).to match("Showing <b>21</b> to <b>26</b> of <b>26</b> logs") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "has pagination in the title" do |
|
|
|
|
|
|
|
expect(page).to have_title("Logs (page 2 of 2)") |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|