From 8d690a9e3358fc92487efc0f789c0367bb879554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Tue, 21 Jan 2020 23:56:01 +0100 Subject: [PATCH] undo changes in introduced by merge conflicts in the api branch --- app/services/photo_service.rb | 7 +------ spec/integration/account_migration_spec.rb | 2 +- spec/integration/api/comments_controller_spec.rb | 2 +- spec/shared_behaviors/account_migration.rb | 1 - spec/spec_helper.rb | 1 + 5 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 spec/shared_behaviors/account_migration.rb diff --git a/app/services/photo_service.rb b/app/services/photo_service.rb index c2d331bb3..673c16c1d 100644 --- a/app/services/photo_service.rb +++ b/app/services/photo_service.rb @@ -54,12 +54,7 @@ class PhotoService end def update_profile_photo(photo) - profile_params = { - image_url: photo.url(:thumb_large), - image_url_medium: photo.url(:thumb_medium), - image_url_small: photo.url(:thumb_small) - } - @user.update_profile(profile_params) + @user.update_profile(photo: photo) end def send_to_streams(photo, photo_params) diff --git a/spec/integration/account_migration_spec.rb b/spec/integration/account_migration_spec.rb index b7faf77f1..1dcfbc713 100644 --- a/spec/integration/account_migration_spec.rb +++ b/spec/integration/account_migration_spec.rb @@ -166,7 +166,7 @@ shared_examples_for "migration scenarios with local user rename" do block = FactoryGirl.create(:block, user: old_user) notification = FactoryGirl.create(:notification, recipient: old_user) report = FactoryGirl.create(:report, user: old_user) - authorization = FactoryGirl.create(:auth_with_read, user: old_user) + authorization = FactoryGirl.create(:auth_with_read_scopes, user: old_user) share_visibility = FactoryGirl.create(:share_visibility, user: old_user) run_migration diff --git a/spec/integration/api/comments_controller_spec.rb b/spec/integration/api/comments_controller_spec.rb index 41befd84c..60eea9816 100644 --- a/spec/integration/api/comments_controller_spec.rb +++ b/spec/integration/api/comments_controller_spec.rb @@ -22,7 +22,7 @@ describe Api::V1::CommentsController do FactoryGirl.create(:auth_with_default_scopes) } - let!(:access_token) { auth.created_at_access_token.to_s } + let!(:access_token) { auth.create_access_token.to_s } let!(:access_token_public_only) { auth_public_only.create_access_token.to_s } let!(:access_token_minimum_scopes) { auth_minimum_scopes.create_access_token.to_s } let(:invalid_token) { SecureRandom.hex(9) } diff --git a/spec/shared_behaviors/account_migration.rb b/spec/shared_behaviors/account_migration.rb deleted file mode 100644 index 8b1378917..000000000 --- a/spec/shared_behaviors/account_migration.rb +++ /dev/null @@ -1 +0,0 @@ - diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 05d631160..61c253fb8 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -146,6 +146,7 @@ RSpec.configure do |config| config.include JSON::SchemaMatchers config.json_schemas[:archive_schema] = "lib/schemas/archive-format.json" + config.json_schemas[:archive_schema] = ArchiveValidator::SchemaValidator::JSON_SCHEMA config.json_schemas[:api_v1_schema] = "lib/schemas/api_v1.json" JSON::Validator.add_schema(