Remove controllers spec already tested elsewhere

This commit is contained in:
Thibault Jouan
2015-05-01 14:11:11 +00:00
parent 5e1757aff9
commit 896fe661bd
15 changed files with 64 additions and 478 deletions

View File

@@ -25,12 +25,18 @@ module AcceptanceHelpers
playlist
end
def create_track
track = attributes_for :track
def create_track file: false
track = attributes_for(file ? :track_with_sound : :track)
visit tracks_path
click_link 'Create track'
fill_in 'Name', with: track[:name]
attach_file 'File', track[:file].path if file
click_button 'Upload'
track
end
def json
expect(response).to be_success
JSON.parse(response.body, symbolize_names: true)
end
end

View File

@@ -1,5 +0,0 @@
module UserControllerHelpers
def sign_in
controller.current_user = FactoryGirl.create(:user)
end
end