diff --git a/spec/controllers/mappings_controller_spec.rb b/spec/controllers/mappings_controller_spec.rb index 8d1c424d..e5f59db7 100644 --- a/spec/controllers/mappings_controller_spec.rb +++ b/spec/controllers/mappings_controller_spec.rb @@ -24,6 +24,7 @@ RSpec.describe MappingsController, type: :controller do post :create, params: { mapping: valid_attributes } + mapping.updated_by = controller.current_user expect(comparable(Mapping.last)).to eq comparable(mapping) end end diff --git a/spec/factories/mappings.rb b/spec/factories/mappings.rb index 1bcdf891..ec06b613 100644 --- a/spec/factories/mappings.rb +++ b/spec/factories/mappings.rb @@ -5,6 +5,7 @@ FactoryGirl.define do yloc 0 map user + association :updated_by, factory: :user association :mappable, factory: :topic factory :mapping_random_location do