spec/controllers/dashboard_controller_spec.rb in sufia-3.0.0 vs spec/controllers/dashboard_controller_spec.rb in sufia-3.1.0
- old
+ new
@@ -1,6 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require 'spec_helper'
describe DashboardController do
before do
GenericFile.any_instance.stub(:terms_of_service).and_return('1')
User.any_instance.stub(:groups).and_return([])
@@ -52,10 +52,10 @@
# Make sure there are at least 3 files owned by @user. Otherwise, the tests aren't meaningful.
if assigns(:document_list).count < 3
files_count = assigns(:document_list).count
until files_count == 3
gf = GenericFile.new()
- gf.apply_depositor_metadata(@user.user_key)
+ gf.apply_depositor_metadata(@user)
gf.save
files_count += 1
end
xhr :get, :index
end