Files
dunlop-core/spec/features/target_files/show_spec.rb
T
2018-01-20 13:02:44 -03:00

26 lines
618 B
Ruby

require 'rails_helper'
feature 'Target files show page' do
background { i_am_logged_in_as_admin }
scenario "download button when completed" do
target_file = create 'target_file/my_target'
target_file.execute_generation_process
target_file.should be_completed
visit "/dunlop/target_files/#{target_file.id}"
page.should have_content "Download"
end
scenario "no download button when not completed" do
target_file = create 'target_file/my_target'
target_file.should be_new
visit "/dunlop/target_files/#{target_file.id}"
page.should_not have_content "Download"
end
end