2021-02-22 17:27:13 +05:30
|
|
|
# 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
|
2021-04-29 21:17:54 +05:30
|
|
|
is_expected.to include(
|
2021-02-22 17:27:13 +05:30
|
|
|
:id,
|
|
|
|
:name,
|
|
|
|
:created_at,
|
|
|
|
:email,
|
|
|
|
:username,
|
|
|
|
:last_activity_on,
|
|
|
|
:avatar_url,
|
2021-03-11 19:13:27 +05:30
|
|
|
:note,
|
2021-02-22 17:27:13 +05:30
|
|
|
:badges,
|
|
|
|
:projects_count,
|
|
|
|
:actions
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|