diff --git a/lib/discourse_api/api/categories.rb b/lib/discourse_api/api/categories.rb index 0437f15..c9f9b69 100644 --- a/lib/discourse_api/api/categories.rb +++ b/lib/discourse_api/api/categories.rb @@ -9,8 +9,10 @@ def create_category(args = {}) args = API .params(args) - .required(:name, :color, :text_color) + .required(:name) .optional( + :color, + :text_color, :slug, :permissions, :auto_close_hours, diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 945b626..c4f2aee 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,6 +9,7 @@ require "discourse_api" require "rspec" require "webmock/rspec" +require "ostruct" RSpec.configure do |config| config.expect_with :rspec do |c|