osem-fcy/spec/models/sponsor_spec.rb

35 lines
797 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2021-02-20 09:57:27 -08:00
# == Schema Information
#
# Table name: sponsors
#
# id :bigint not null, primary key
# description :text
# logo_file_name :string
# name :string
# picture :string
# website_url :string
# created_at :datetime
# updated_at :datetime
# conference_id :integer
# sponsorship_level_id :integer
#
2014-06-05 17:51:22 +05:30
require 'spec_helper'
describe Sponsor do
describe 'validations' do
it 'has a valid factory' do
expect(build(:sponsor)).to be_valid
end
it 'is not valid without a name' do
should validate_presence_of(:name)
end
it 'is not valid without a website url' do
should validate_presence_of(:website_url)
end
end
end