Browse Source

Remove obsolete tests and config

pull/235/head
baarkerlounger 3 years ago
parent
commit
af962e8e30
  1. 4
      app/webpacker/controllers/govukfrontend_controller.js
  2. 2
      config/application.rb
  3. 20
      spec/models/case_log_spec.rb

4
app/webpacker/controllers/govukfrontend_controller.js

@ -1,5 +1,5 @@
import {initAll} from "govuk-frontend";
import {Controller} from "@hotwired/stimulus";
import { initAll } from "govuk-frontend";
import { Controller } from "@hotwired/stimulus";
export default class extends Controller {
connect() {

2
config/application.rb

@ -33,7 +33,5 @@ module DataCollector
# config.eager_load_paths << Rails.root.join("extras")
config.exceptions_app = routes
config.action_view.form_with_generates_remote_forms = false
end
end

20
spec/models/case_log_spec.rb

@ -153,16 +153,7 @@ RSpec.describe Form, type: :model do
end
context "armed forces injured validation" do
it "must be answered if tenant was a regular or reserve in armed forces" do
expect {
CaseLog.create!(armedforces: "A current or former regular in the UK Armed Forces (excluding National Service)",
reservist: nil,
owning_organisation: owning_organisation,
managing_organisation: managing_organisation)
}.to raise_error(ActiveRecord::RecordInvalid)
end
it "must be answered if tenant was not a regular or reserve in armed forces" do
it "must not be answered if tenant was not a regular or reserve in armed forces" do
expect {
CaseLog.create!(armedforces: "No",
reservist: "Yes",
@ -466,15 +457,6 @@ RSpec.describe Form, type: :model do
end
context "armed forces active validation" do
it "must be answered if ever served in the forces as a regular" do
expect {
CaseLog.create!(armedforces: "A current or former regular in the UK Armed Forces (excluding National Service)",
leftreg: nil,
owning_organisation: owning_organisation,
managing_organisation: managing_organisation)
}.to raise_error(ActiveRecord::RecordInvalid)
end
it "must not be answered if not ever served as a regular" do
expect {
CaseLog.create!(armedforces: "No",

Loading…
Cancel
Save