Skip to content

Commit

Permalink
🧹 Sections: Fix failing spec (#2070)
Browse files Browse the repository at this point in the history
#1155

Not really sure if I actually fixed it; but oh well; this is easier to
read IMO
  • Loading branch information
zspencer authored Dec 27, 2023
1 parent dbe9c79 commit 9d4e664
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "swagger_helper"

RSpec.describe "/spaces/:space_slug/rooms/" do # rubocop:disable RSpec/DescribeClass
RSpec.describe RoomsController do # rubocop:disable RSpec/DescribeClass
let(:space) { create(:space) }
let(:membership) { create(:membership, space: space) }
let!(:person) { membership.member }
Expand Down Expand Up @@ -160,10 +160,12 @@
end

context "when the space has an entrance" do
before { space.update(entrance: create(:room, space: space)) }
it "still creates the room" do
space.update(entrance: create(:room, space: space))

specify { expect { do_request }.to(change { space.rooms.count }.by(1)) }
it { is_expected.to redirect_to(polymorphic_path(space.rooms.order(created_at: :desc).first.location(:edit))) }
expect { do_request }.to(change { space.rooms.count }.by(1))
expect(response).to redirect_to(polymorphic_path(space.rooms.order(created_at: :desc).first.location(:edit)))
end
end
end
end
Expand Down

0 comments on commit 9d4e664

Please sign in to comment.