Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/serializers/admin/user_serializer_spec.rb')
-rw-r--r--spec/serializers/admin/user_serializer_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/serializers/admin/user_serializer_spec.rb b/spec/serializers/admin/user_serializer_spec.rb
new file mode 100644
index 00000000000..719a90384c6
--- /dev/null
+++ b/spec/serializers/admin/user_serializer_spec.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+require "spec_helper"
+
+RSpec.describe Admin::UserSerializer do
+ let(:resource) { build(:user) }
+
+ subject { described_class.new.represent(resource).keys }
+
+ context 'when there is a single object provided' do
+ it 'contains important elements for the admin user table' do
+ is_expected.to contain_exactly(
+ :id,
+ :name,
+ :created_at,
+ :email,
+ :username,
+ :last_activity_on,
+ :avatar_url,
+ :badges,
+ :projects_count,
+ :actions
+ )
+ end
+ end
+end