I’ve got a spec that started failing a few days ago. It looks like it’s due to something about timzone? I don’t see a way that it’s my plugin’s fault, but maybe I’m missing something?
require 'rails_helper' describe TopicDefaultTag::ActionsController do before do Jobs.run_immediately! end it 'can list' do sign_in(Fabricate(:user)) get "/topic-default-tag/list.json" expect(response.status).to eq(200) end end
Running Rspec: plugins/discourse-topic-default-tag/spec/requests/actions_controller_spec.rb Loading plugins while running specs An error occurred while loading ./plugins/discourse-topic-default-tag/spec/requests/actions_controller_spec.rb. Failure/Error: UserOption.create!(user_id: id) NoMethodError: undefined method `timezone' for #<UserOption:0x000055dd7af16ca8> Did you mean? timeout # ./app/models/user.rb:1343:in `create_user_option' # (eval):19:in `block (2 levels) in run_file' # ./spec/rails_helper.rb:79:in `<top (required)>' # ./plugins/discourse-topic-default-tag/spec/requests/actions_controller_spec.rb:1:in `require' # ./plugins/discourse-topic-default-tag/spec/requests/actions_controller_spec.rb:1:in `<top (required)>' No examples found. Finished in 0.00005 seconds (files took 3.52 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples