require "rails_helper" describe Import do describe "associations" do it { is_expected.to belong_to(:project) } it { is_expected.to belong_to(:releasable).optional } end describe "validations" do it { is_expected.to allow_content_type("application/pdf").for(:file) } it { is_expected.not_to allow_content_types("image/png", "image/jpeg").for(:file) } end describe "enums" do it { is_expected.to define_enum_for(:status).with_values([:pending, :started, :finished, :failed]) } end describe "#file" do it { is_expected.to respond_to(:file) } end end