blob: d2d287d8e241bad413bf223c368b46e0ef846a7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe BoardGroupRecentVisit do
let_it_be(:board_parent) { create(:group) }
let_it_be(:board) { create(:board, group: board_parent) }
describe 'relationships' do
it { is_expected.to belong_to(:user) }
it { is_expected.to belong_to(:group) }
it { is_expected.to belong_to(:board) }
end
describe 'validations' do
it { is_expected.to validate_presence_of(:user) }
it { is_expected.to validate_presence_of(:group) }
it { is_expected.to validate_presence_of(:board) }
end
it_behaves_like 'boards recent visit' do
let_it_be(:board_relation) { :board }
let_it_be(:board_parent_relation) { :group }
let_it_be(:visit_relation) { :board_group_recent_visit }
end
end
|