Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 Rename image_form_spec to reflect decoration #37

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
# frozen_string_literal: true

# Generated via
# `rails generate hyrax:work Image`

RSpec.describe Hyrax::ImageForm do
let(:work) { Image.new }
let(:form) { described_class.new(work, nil, nil) }
let(:file_set) { FactoryBot.create(:file_set) }

describe ".model_attributes" do
subject { described_class.model_attributes(params) }

let(:params) { ActionController::Parameters.new(attributes) }
let(:attributes) do
{
title: ['foo'],
extent: ['extent']
}
end

it 'permits parameters' do
expect(subject['extent']).to eq ['extent']
end
end

describe '.terms' do
it 'returns an array of inherited and custom terms' do
expect(described_class.terms.sort).to eq(
Expand All @@ -37,10 +14,9 @@
visibility ordered_member_ids source in_works_ids member_of_collection_ids
admin_set_id resource_type extent aark_id part_of place_of_publication
date_issued alt bibliographic_citation remote_url
access_right alternative_title rights_notes
].sort
)
end
end

include_examples("work_form")
end