Skip to content

Commit

Permalink
Add specs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmir committed Dec 9, 2024
1 parent d29beb0 commit b0f2dda
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,32 @@
expect(response).to have_http_status(:not_found)
end
end

describe "Show more" do
context "when there are more than 5 scheduled instances" do
it "shows the footer" do
get recurring_meeting_path(recurring_meeting)

expect(page).to have_css("#recurring-meetings-footer-component")
end
end

context "when there are 5 or fewer scheduled instances" do
let(:recurring_meeting) do
create :recurring_meeting,
project:,
author: user,
start_time: Time.zone.today + 1.day,
frequency: "daily",
end_after: "iterations",
iterations: 5
end

it "shows no footer" do
get recurring_meeting_path(recurring_meeting)

expect(page).to have_no_css("#recurring-meetings-footer-component")
end
end
end
end

0 comments on commit b0f2dda

Please sign in to comment.