debian-mirror-gitlab/spec/services/boards/visits/create_service_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
695 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Boards::Visits::CreateService do
2018-12-13 13:39:08 +05:30
describe '#execute' do
let(:user) { create(:user) }
context 'when a project board' do
2021-06-08 01:23:25 +05:30
let_it_be(:project) { create(:project) }
let_it_be(:board) { create(:board, project: project) }
2018-12-13 13:39:08 +05:30
2021-06-08 01:23:25 +05:30
let_it_be(:model) { BoardProjectRecentVisit }
2018-12-13 13:39:08 +05:30
2021-06-08 01:23:25 +05:30
it_behaves_like 'boards recent visit create service'
2018-12-13 13:39:08 +05:30
end
context 'when a group board' do
2021-06-08 01:23:25 +05:30
let_it_be(:group) { create(:group) }
let_it_be(:board) { create(:board, group: group) }
let_it_be(:model) { BoardGroupRecentVisit }
2018-12-13 13:39:08 +05:30
2021-06-08 01:23:25 +05:30
it_behaves_like 'boards recent visit create service'
2018-12-13 13:39:08 +05:30
end
end
end