order exports in /courses/X/content_exports

fixes CNVS-14765

test plan:
 - have a course with multiple content exports
 - /courses/X/content_exports should display them in order
   by date, descending

Change-Id: I76356ab83b9631dd192dea18c331b425505a92d2
Reviewed-on: https://gerrit.instructure.com/39252
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
This commit is contained in:
Jeremy Stanley 2014-08-13 14:14:53 -06:00
parent 7dce219353
commit 5c09df93e5
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class ContentExportsController < ApplicationController
end
def index
@exports = @context.content_exports_visible_to(@current_user).active.not_for_copy
@exports = @context.content_exports_visible_to(@current_user).active.not_for_copy.order('created_at DESC')
@current_export_id = nil
if export = @context.content_exports_visible_to(@current_user).running.first

View File

@ -75,7 +75,7 @@ describe ContentExportsController do
user_session(@teacher)
get :index, course_id: @course.id
response.should be_success
assigns(:exports).map(&:id).should == [@acx.id, @tcx.id, @tzx.id]
assigns(:exports).map(&:id).should =~ [@acx.id, @tcx.id, @tzx.id]
end
end