docbrown/spec/requests/admin/overview_spec.rb
Ridhwana ba5c97de50
RFC 50 - Remove old admin routes and related code (#13579)
* chore: remove current_admin routes file

* feat: move all the admin routes into the admin file

* chore: remove conditionals for the sidebar and tabbed navbar

* remove some more notes where we use the admin_restructure feature flag

* chore: amend the tests now that the old routes and the admin_restructure flag are removed

* chore: remove more references to the  admin_restructure flag

* chore: fix the tests

* chore: remove sidebar_spec

* chore: add slash back

* chore: comment it out for now whilst I try and figure out why its not passing
2021-05-03 16:03:38 +02:00

28 lines
725 B
Ruby

require "rails_helper"
RSpec.describe "/admin", type: :request do
let(:super_admin) { create(:user, :super_admin) }
before do
sign_in super_admin
allow(FeatureFlag).to receive(:enabled?).and_call_original
end
describe "Last deployed and Lastest Commit ID card" do
before do
ForemInstance.instance_variable_set(:@deployed_at, nil)
end
after do
ForemInstance.instance_variable_set(:@deployed_at, nil)
end
it "shows the correct value if the Last deployed time is available" do
stub_const("ENV", ENV.to_h.merge("HEROKU_RELEASE_CREATED_AT" => "Some date"))
get admin_path
expect(response.body).to include(ENV["HEROKU_RELEASE_CREATED_AT"])
end
end
end