docbrown/spec/requests/invitations_spec.rb
Anna Buianova 7d053471f8
Rubocop fixes in spec/requests (#18946)
* Rubocop fixes in spec/requests

* Fixed spec/requests/api/v0/articles_spec.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-12 19:10:16 +03:00

16 lines
633 B
Ruby

require "rails_helper"
RSpec.describe "Invitations" do
let(:user) { create(:user) }
describe "Accept invitation" do
it "renders normal response even if the Forem instance is private" do
allow(Settings::UserExperience).to receive(:public).and_return(false)
get "/users/invitation/accept?invitation_token=blahblahblahblah"
# This is a fake token, so the only thing we're testing for here is
# that we *do not* land on the "registrations" page which shouldn't
# interrupt the request, even for private forems.
expect(response.body).not_to include("registration__actions")
end
end
end