Remove last remnants of Flipflop (#2585)

This commit is contained in:
rhymes 2019-04-27 01:26:46 +02:00 committed by Ben Halpern
parent bfedee0561
commit 04d2bb4190

View file

@ -74,60 +74,11 @@ RSpec.describe "Pages", type: :request do
end
describe "GET /live" do
let(:user) { create(:user) }
context "when nothing is live" do
it "shows the correct message" do
get "/live"
expect(response.body).to include("Nothing is live right now")
end
end
context "when live is starting soon" do
before do
test_strategy = Flipflop::FeatureSet.current.test!
test_strategy.switch!(:live_starting_soon, true)
get "/live"
end
after do
test_strategy = Flipflop::FeatureSet.current.test!
test_strategy.switch!(:live_starting_soon, false)
end
xit "shows the correct message" do
expect(response.body).to include("Our event is starting soon")
end
end
context "when live is live" do
before do
test_strategy = Flipflop::FeatureSet.current.test!
test_strategy.switch!(:live_is_live, true)
create(:chat_channel, :workshop)
end
after do
test_strategy = Flipflop::FeatureSet.current.test!
test_strategy.switch!(:live_is_live, false)
end
xit "shows a sign in page for logged out users" do
get "/live"
expect(response.body).to include("Great to have you")
end
xit "shows the video for logged in users" do
login_as user
get "/live"
expect(response.body).to include("<iframe class=\"live-video\"")
end
xit "shows the chat for logged in users" do
login_as user
get "/live"
expect(response.body).to include("<div id=\"chat\"")
end
end
end
end