Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (26 sloc) 915 Bytes
require 'spec_helper'
feature "Artists" do
scenario "Show an artist" do
artist = create(:artist)
visit artist_path(artist)
expect(page).to have_content(artist.description)
end
scenario "Add an artist", js: true do
admin = AdminUser.create!(email: 'admin@example.com', password: 'test1234')
create_home_page
sign_in
create(:country, name: 'Canada')
visit new_artist_path
fill_in "Nom", with: "Name"
fill_in "Prénom", with: "First name"
fill_in "Description", with: "A description"
fill_in "Année de naissance", with: "1930"
fill_in "Année de décès", with: "1990"
select "Canada", from: "Pays"
click_on "Proposer l'artiste"
success_message = "Information Le nom de votre artiste a été soumis pour "\
"considération."
expect(page).to have_content(success_message)
expect(last_email).to deliver_to(admin.email)
end
end