Make sure the specs are passing

This commit is contained in:
Petko Bordjukov 2014-08-31 16:33:42 +03:00
parent 5554ffd6aa
commit 15f21daff0
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ FactoryGirl.define do
last_name "Doe" last_name "Doe"
organisation "Example Org" organisation "Example Org"
public_email "a@b.com" public_email "a@b.com"
photo_url "http://placehold.it/50x50" picture { Rack::Test::UploadedFile.new(File.join(Rails.root, 'spec', 'support', 'picture.jpg')) }
mobile_phone "0883444555" mobile_phone "0883444555"
biography "Lorem ipsum" biography "Lorem ipsum"
github "octocat" github "octocat"

View File

@ -9,8 +9,8 @@ RSpec.describe SpeakerProfile, :type => :model do
expect(build(:speaker_profile, last_name: nil)).to have_error_on :last_name expect(build(:speaker_profile, last_name: nil)).to have_error_on :last_name
end end
it 'is invalid without a photo' do it 'is invalid without a picture' do
expect(build(:speaker_profile, photo_url: nil)).to have_error_on :photo_url expect(build(:speaker_profile, picture: nil)).to have_error_on :picture
end end
describe 'mobile_phone' do describe 'mobile_phone' do

0
spec/support/picture.jpg Normal file
View File