Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Nov 20, 2024
1 parent 3c73ff3 commit 2ac664e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
get "/activity" => "activity#index", :as => :activity
end

if SiteSettings.multiuser_enabled?
if SiteSettings.multiuser_enabled? || Rails.env.test?
authenticate :user, lambda { |u| u.is_moderator? } do
namespace :settings do
resources :users
Expand Down
12 changes: 5 additions & 7 deletions spec/requests/settings/users_spec.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
require "rails_helper"

RSpec.describe "/settings/users" do
RSpec.describe "/settings/users", :multiuser do
describe "GET /index", :as_moderator do
it "renders a successful response" do
create(:user)
get users_url
get "/settings/users"
expect(response).to be_successful
end
end

describe "GET /show" do
describe "GET /show", :as_moderator do
it "renders a successful response" do
user = Settings::User.create! valid_attributes
get user_url(user)
user = create(:user)
get "/settings/users/#{user.to_param}"
expect(response).to be_successful
end
end

describe "GET /new" do
end
13 changes: 0 additions & 13 deletions spec/routing/moderation/users_routing_spec.rb

This file was deleted.

0 comments on commit 2ac664e

Please sign in to comment.