blob: 6632a8106ca2f1cb2df6148401cde98ddfe0aeba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
require 'fast_spec_helper'
RSpec.describe ::Gitlab::Nav::TopNavMenuItem, feature_category: :navigation do
describe '.build' do
it 'builds a hash from the given args' do
item = {
id: 'id',
title: 'Title',
active: true,
icon: 'icon',
href: 'href',
view: 'view',
css_class: 'css_class',
data: {},
emoji: 'smile'
}
expect(described_class.build(**item)).to eq(item.merge(type: :item))
end
end
end
|