fixed test (missing format)

also returning 406 now when unsupported format is requested instead of TemplateMissing message
pull/1186/head
Dennis Schmidt 12 years ago
parent 5edae34f65
commit 9d686393e1
  1. 4
      app/controllers/journals_controller.rb
  2. 2
      test/functional/journals_controller_test.rb

@ -33,7 +33,9 @@ class JournalsController < ApplicationController
:limit => 25)
end
@title = (@project ? @project.name : Setting.app_title) + ": " + (@query.new_record? ? l(:label_changes_details) : @query.name)
render :layout => false, :content_type => 'application/atom+xml'
respond_to do |format|
format.atom { render :layout => false, :content_type => 'application/atom+xml' }
end
rescue ActiveRecord::RecordNotFound
render_404
end

@ -57,7 +57,7 @@ class JournalsControllerTest < ActionController::TestCase
end
def test_index
get :index, :project_id => 1
get :index, :project_id => 1, :format => :atom
assert_response :success
assert_not_nil assigns(:journals)
assert_equal 'application/atom+xml', @response.content_type

Loading…
Cancel
Save