0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

Use explicit file loading for tests coverage

Dieser Commit ist enthalten in:
Angus McLeod 2020-12-01 08:20:10 +11:00
Ursprung 8274884505
Commit f6f77547d7
35 geänderte Dateien mit 43 neuen und 42 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,5 @@
{ {
"result": { "result": {
"covered_percent": 89.03 "covered_percent": 89.17
} }
} }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::Action do describe CustomWizard::Action do
fab!(:user) { Fabricate(:user, name: "Angus", username: 'angus', email: "angus@email.com", trust_level: TrustLevel[2]) } fab!(:user) { Fabricate(:user, name: "Angus", username: 'angus', email: "angus@email.com", trust_level: TrustLevel[2]) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::Builder do describe CustomWizard::Builder do
fab!(:trusted_user) { fab!(:trusted_user) {

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::CustomField do describe CustomWizard::CustomField do

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::Field do describe CustomWizard::Field do
before do before do

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::Log do describe CustomWizard::Log do
before do before do

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::Mapper do describe CustomWizard::Mapper do
fab!(:user1) { fab!(:user1) {

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::Template do describe CustomWizard::Template do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::TemplateValidator do describe CustomWizard::TemplateValidator do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::UpdateValidator do describe CustomWizard::UpdateValidator do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::Wizard do describe CustomWizard::Wizard do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper" require_relative '../plugin_helper'
describe "custom field extensions" do describe "custom field extensions" do
fab!(:topic) { Fabricate(:topic) } fab!(:topic) { Fabricate(:topic) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../plugin_helper'
describe ExtraLocalesControllerCustomWizard, type: :request do describe ExtraLocalesControllerCustomWizard, type: :request do
let(:new_user) { Fabricate(:user, trust_level: TrustLevel[0]) } let(:new_user) { Fabricate(:user, trust_level: TrustLevel[0]) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../plugin_helper'
describe InvitesControllerCustomWizard, type: :request do describe InvitesControllerCustomWizard, type: :request do
fab!(:topic) { Fabricate(:topic) } fab!(:topic) { Fabricate(:topic) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../plugin_helper'
describe CustomWizardUsersController, type: :request do describe CustomWizardUsersController, type: :request do
let(:template) do let(:template) do

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../plugin_helper'
describe CustomWizardFieldExtension do describe CustomWizardFieldExtension do
let(:field_hash) do let(:field_hash) do

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../plugin_helper'
describe CustomWizardStepExtension do describe CustomWizardStepExtension do
let(:step_hash) do let(:step_hash) do

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../plugin_helper'
describe Jobs::ClearAfterTimeWizard do describe Jobs::ClearAfterTimeWizard do
fab!(:user1) { Fabricate(:user) } fab!(:user1) { Fabricate(:user) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../plugin_helper'
describe Jobs::SetAfterTimeWizard do describe Jobs::SetAfterTimeWizard do
fab!(:user1) { Fabricate(:user) } fab!(:user1) { Fabricate(:user) }

Datei anzeigen

@ -1,10 +1,11 @@
# frozen_string_literal: true
require 'simplecov' require 'simplecov'
SimpleCov.configure do SimpleCov.start do
add_filter do |src| root "plugins/discourse-custom-wizard"
src.filename !~ /discourse-custom-wizard/ || track_files "plugins/discourse-custom-wizard/**/*.rb"
src.filename =~ /spec/ || add_filter { |src| src.filename =~ /(\/spec\/|\/db\/|plugin\.rb|api)/ }
src.filename =~ /db/ ||
src.filename =~ /api/ ## API features are currently experimental
end
end end
require 'rails_helper'

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../../plugin_helper'
describe CustomWizard::AdminCustomFieldsController do describe CustomWizard::AdminCustomFieldsController do
fab!(:admin_user) { Fabricate(:user, admin: true) } fab!(:admin_user) { Fabricate(:user, admin: true) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../../plugin_helper'
describe CustomWizard::AdminLogsController do describe CustomWizard::AdminLogsController do
fab!(:admin_user) { Fabricate(:user, admin: true) } fab!(:admin_user) { Fabricate(:user, admin: true) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../../plugin_helper'
describe CustomWizard::AdminManagerController do describe CustomWizard::AdminManagerController do
fab!(:admin_user) { Fabricate(:user, admin: true) } fab!(:admin_user) { Fabricate(:user, admin: true) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../../plugin_helper'
describe CustomWizard::AdminSubmissionsController do describe CustomWizard::AdminSubmissionsController do
fab!(:admin_user) {Fabricate(:user, admin: true)} fab!(:admin_user) {Fabricate(:user, admin: true)}

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../../plugin_helper'
describe CustomWizard::AdminWizardController do describe CustomWizard::AdminWizardController do
fab!(:admin_user) {Fabricate(:user, admin: true)} fab!(:admin_user) {Fabricate(:user, admin: true)}

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe ApplicationController do describe ApplicationController do
fab!(:user) { fab!(:user) {

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper" require_relative '../../plugin_helper'
describe "custom field extensions" do describe "custom field extensions" do
let!(:topic) { Fabricate(:topic) } let!(:topic) { Fabricate(:topic) }

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::StepsController do describe CustomWizard::StepsController do
fab!(:user) { fab!(:user) {

Datei anzeigen

@ -1,4 +1,4 @@
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::WizardController do describe CustomWizard::WizardController do
fab!(:user) { fab!(:user) {

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::BasicWizardSerializer do describe CustomWizard::BasicWizardSerializer do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::CustomFieldSerializer do describe CustomWizard::CustomFieldSerializer do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::LogSerializer do describe CustomWizard::LogSerializer do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::FieldSerializer do describe CustomWizard::FieldSerializer do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::WizardSerializer do describe CustomWizard::WizardSerializer do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

Datei anzeigen

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'rails_helper' require_relative '../../plugin_helper'
describe CustomWizard::StepSerializer do describe CustomWizard::StepSerializer do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }