* Removes FeatureFlag.enabled?(:creator_onboarding) from codebase * Removes FeatureFlag.enabled?(:creator_onboarding) from specs * Further cleanup, removal, and spec fixes * Fixes the user_request_confirmation_spec.rb * Reverts change to confirmation email button * Revert revert after looking at designs again :( * Removes redundant logo_png field from config + fixes test * Rewords an expectation in user_uses_the_editor_spec.rb * Revert removal of logo_png from Config images * Removes CSS class from user_uses_the_editor_spec.rb * Removes test from user_uses_the_editor_sepc.rb * Removes unnecessary else from _logo.html.erb * Adds back removed system spec * Removes SVG-related code from _logo.html.erb * Removes AsyncInfoController#use_creator_onboarding * Fixes spec failues due to removed code * Removes svg-related code (that I thought I removed already :/ ) * Re-removes FeatureFlag and logo_svg from _images.html.erb * Remove newest instances of FeatureFlag(:creator_onboarding) * remove instances where we use the creator_onboarding field from the base_data * fix: redirect to the correct path in the reguistrations controller based on whether the user is a creator or not Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
33 lines
1 KiB
Ruby
33 lines
1 KiB
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "AsyncInfo", type: :request do
|
|
let(:controller_instance) { AsyncInfoController.new }
|
|
|
|
before do
|
|
allow(AsyncInfoController).to receive(:new).and_return(controller_instance)
|
|
end
|
|
|
|
describe "GET /async_info/base_data" do
|
|
context "when not logged-in" do
|
|
it "returns json without user" do
|
|
get "/async_info/base_data"
|
|
expect(response.parsed_body.keys).to match_array(%w[broadcast param token])
|
|
end
|
|
|
|
it "renders normal response even if the Forem instance is private" do
|
|
allow(Settings::UserExperience).to receive(:public).and_return(false)
|
|
get "/async_info/base_data"
|
|
expect(response.parsed_body.keys).to match_array(%w[broadcast param token])
|
|
end
|
|
end
|
|
|
|
context "when logged in" do
|
|
it "returns token and user" do
|
|
sign_in create(:user)
|
|
|
|
get "/async_info/base_data"
|
|
expect(response.parsed_body.keys).to match_array(%w[broadcast creator param token user])
|
|
end
|
|
end
|
|
end
|
|
end
|