Fix rubocop ofenses
Some checks failed
Run unit tests / check-licenses (pull_request) Successful in 1m5s
Run unit tests / copyright_notice (pull_request) Successful in 1m46s
Run unit tests / rubocop (pull_request) Failing after 2m2s
Run unit tests / unit_tests (pull_request) Successful in 4m55s
Run unit tests / build-static-assets (pull_request) Has been skipped
Some checks failed
Run unit tests / check-licenses (pull_request) Successful in 1m5s
Run unit tests / copyright_notice (pull_request) Successful in 1m46s
Run unit tests / rubocop (pull_request) Failing after 2m2s
Run unit tests / unit_tests (pull_request) Successful in 4m55s
Run unit tests / build-static-assets (pull_request) Has been skipped
This commit is contained in:
parent
3e363ac7dd
commit
a142321354
@ -1,5 +1,7 @@
|
||||
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
|
||||
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WebsitesController < ApplicationController
|
||||
def show
|
||||
render json: current_tenant.website.as_json(only: %i[content]) || {}, status: :ok
|
||||
@ -16,6 +18,6 @@ class WebsitesController < ApplicationController
|
||||
private
|
||||
|
||||
def website_params
|
||||
params.require(:website).permit(:content)
|
||||
params.expect(website: [:content])
|
||||
end
|
||||
end
|
||||
|
@ -1,8 +1,10 @@
|
||||
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
|
||||
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :website do
|
||||
content { "MyText" }
|
||||
content { 'MyText' }
|
||||
wedding { nil }
|
||||
end
|
||||
end
|
||||
|
@ -1,7 +1,9 @@
|
||||
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
|
||||
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Website, type: :model do
|
||||
it { should belong_to(:wedding) }
|
||||
RSpec.describe Website do
|
||||
it { is_expected.to belong_to(:wedding) }
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user