adrianov
5/18/2015 - 3:50 PM

gistfile1.rb

require 'rails_helper'

RSpec.describe Event, type: :model do
  it 'imports from Eventbrite' do
    event = Event.new.import('http://www.eventbrite.com/e/eastlake-music-festival-2015-tickets-16386728145?aff=es2')
    expect(event.external_service).to eq :eventbrite
    expect(event.external_id).to eq '16386728145'

    expect(event.name).to eq 'Eastlake Music Festival 2015'
    expect(event.description).to eq "<P>EMF is a FREE music and cultural arts festival on the shores of Lake Merritt, nestled in the heart of Oakland, California.</P>\r\n<P>EMF promotes independent music, performance and the cultural arts of all genres, but with a twist. For one, we are 501(c)3 fiscally sponsored, meaning we are Not For Sale! (e.g. free from the burdens of for-profit programming, lineups and fads) Additionally, every year over 70 volunteers (e.g. local artists, neighbors and businesses) all give their time, contribute resources, and donate their talents for FREE. Finally, we are a FREE event for ALL AGES, because live music and art shouldn’t be a luxury for the few. We just love new music, art &amp; dance. We believe there’s so much more out there, than what your hands can type or your computer screen can hold. EMF is local music &amp; cultural arts by the people, for the people.</P>\r\n<P>LINE UP INFO COMING SOON!</P>"
  end
end