10 lines
352 B
Ruby
10 lines
352 B
Ruby
|
|
shared_examples_for "a contractable" do
|
||
|
|
it { is_expected.to respond_to(:contract) }
|
||
|
|
it { is_expected.to respond_to(:contract_file_name) }
|
||
|
|
|
||
|
|
describe "validations" do
|
||
|
|
it { is_expected.to allow_content_type("application/pdf").for(:contract) }
|
||
|
|
it { is_expected.not_to allow_content_types("text/plain", "image/png").for(:contract) }
|
||
|
|
end
|
||
|
|
end
|