mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
18 lines
392 B
Ruby
18 lines
392 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
describe TrackSerializer, type: :serializer do
|
|
let(:track) { create(:track) }
|
|
let(:serializer) { TrackSerializer.new(track) }
|
|
|
|
it 'sets guild, name, color' do
|
|
expected_json = {
|
|
guid: track.guid,
|
|
name: track.name,
|
|
color: track.color
|
|
}.to_json
|
|
|
|
expect(serializer.to_json).to eq expected_json
|
|
end
|
|
end
|