about summary refs log tree commit diff
path: root/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-11-20 15:36:09 +0100
committerThibaut Girka <thib@sitedethib.com>2019-11-20 15:36:09 +0100
commitff67385cfbfd6f5403b2f8b58407dc730dc7e694 (patch)
treea8a0df2129a863a739dda6399352d64af811110e /spec/controllers/api/v1/accounts/credentials_controller_spec.rb
parent707c4918b21d19dd53b64120dbc7263f45fc5ecd (diff)
parent8dfc45f757ed8995be0d16e88a1f1d6514dae677 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- README.md
  discarded upstream changes
- app/controllers/api/v1/bookmarks_controller.rb
  finally merged upstream, some code style fixes
  and slightly changed pagination code
- app/controllers/application_controller.rb
  changed upstream to always return HTML error pages
  slight conflict caused by theming code
- app/models/bookmark.rb
  finally merged upstream, no real conflict
- spec/controllers/api/v1/bookmarks_controller_spec.rb
  finally merged upstream, slightly changed pagination code
Diffstat (limited to 'spec/controllers/api/v1/accounts/credentials_controller_spec.rb')
-rw-r--r--spec/controllers/api/v1/accounts/credentials_controller_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
index e9466e4ed..4fa6fbcf4 100644
--- a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
+++ b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
@@ -59,6 +59,19 @@ describe Api::V1::Accounts::CredentialsController do
         end
       end
 
+      describe 'with empty source list' do
+        before do
+          patch :update, params: {
+            display_name: "I'm a cat",
+            source: {},
+          }, as: :json
+        end
+
+        it 'returns http success' do
+          expect(response).to have_http_status(200)
+        end
+     end
+
       describe 'with invalid data' do
         before do
           note = 'This is too long. '