Sha256: 40f70f28826a3aed6f10e1fef03da2d13f46646dae536d26529b25592d367258
Contents?: true
Size: 552 Bytes
Versions: 10
Compression:
Stored size: 552 Bytes
Contents
require 'spec_helper' RSpec.describe Hyrax::Forms::AdminSetForm do let(:form) { described_class.new(model) } describe "[] accessors" do let(:model) { AdminSet.new(description: ['one']) } it "cast to scalars" do expect(form[:description]).to eq 'one' end end describe "model_attributes" do let(:raw_attrs) { ActionController::Parameters.new(title: 'test title') } subject { described_class.model_attributes(raw_attrs) } it "casts to enums" do expect(subject[:title]).to eq ['test title'] end end end
Version data entries
10 entries across 10 versions & 2 rubygems