2019-09-14 01:55:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-12-29 07:35:06 -05:00
|
|
|
require "rails_helper"
|
2019-09-14 01:55:25 -04:00
|
|
|
|
2024-01-16 11:51:44 -05:00
|
|
|
RSpec.describe DiscourseSubscriptions::AdminController do
|
|
|
|
let(:admin) { Fabricate(:admin) }
|
2019-09-23 03:53:05 -04:00
|
|
|
|
2024-03-06 08:51:25 -05:00
|
|
|
before do
|
|
|
|
sign_in(admin)
|
|
|
|
SiteSetting.discourse_subscriptions_enabled = true
|
|
|
|
end
|
2019-09-14 01:55:25 -04:00
|
|
|
|
2024-01-16 11:51:44 -05:00
|
|
|
it "is a subclass of AdminController" do
|
|
|
|
expect(DiscourseSubscriptions::AdminController < ::Admin::AdminController).to eq(true)
|
|
|
|
end
|
2019-09-15 07:44:10 -04:00
|
|
|
|
2024-01-16 11:51:44 -05:00
|
|
|
it "is ok" do
|
2023-07-16 23:41:31 -04:00
|
|
|
get "/subscriptions/admin.json"
|
2024-01-16 11:51:44 -05:00
|
|
|
expect(response.status).to eq(200)
|
2019-09-14 01:55:25 -04:00
|
|
|
end
|
|
|
|
end
|