Move *_url spec to controller, because the subscription model does not handle urls anymore
This commit is contained in:
@ -16,21 +16,6 @@ describe Submission do
|
||||
expect(described_class.create.errors[:user_type]).to be_present
|
||||
end
|
||||
|
||||
[:render, :run, :test].each do |action|
|
||||
describe "##{action}_url" do
|
||||
let(:url) { submission.send(:"#{action}_url") }
|
||||
|
||||
it "starts like the #{action} path" do
|
||||
filename = File.basename(__FILE__)
|
||||
expect(url).to start_with(Rails.application.routes.url_helpers.send(:"#{action}_submission_path", submission, filename).sub(filename, ''))
|
||||
end
|
||||
|
||||
it 'ends with a placeholder' do
|
||||
expect(url).to end_with(Submission::FILENAME_URL_PLACEHOLDER)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#main_file' do
|
||||
let(:submission) { FactoryGirl.create(:submission) }
|
||||
|
||||
|
Reference in New Issue
Block a user