diff options
Diffstat (limited to 'spec/frontend/fixtures/groups.rb')
-rw-r--r-- | spec/frontend/fixtures/groups.rb | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/spec/frontend/fixtures/groups.rb b/spec/frontend/fixtures/groups.rb index 9c22ff176ff..e69287c879b 100644 --- a/spec/frontend/fixtures/groups.rb +++ b/spec/frontend/fixtures/groups.rb @@ -2,24 +2,39 @@ require 'spec_helper' -RSpec.describe 'Groups (JavaScript fixtures)', type: :controller do +RSpec.describe 'Groups (JavaScript fixtures)', feature_category: :groups_and_projects do + include ApiHelpers include JavaScriptFixturesHelpers - let(:user) { create(:user) } - let(:group) { create(:group, name: 'frontend-fixtures-group', runners_token: 'runnerstoken:intabulasreferre') } + let_it_be(:user) { create(:user) } + let_it_be(:group) { create(:group, name: 'frontend-fixtures-group', runners_token: 'runnerstoken:intabulasreferre') } + let_it_be(:projects) { create_list(:project, 2, namespace: group) } - before do - group.add_owner(user) - sign_in(user) - end + describe GroupsController, '(JavaScript fixtures)', type: :controller do + render_views - render_views + before do + group.add_owner(user) + sign_in(user) + end - describe GroupsController, '(JavaScript fixtures)', type: :controller do it 'groups/edit.html' do get :edit, params: { id: group } expect(response).to be_successful end end + + describe API::Groups, '(JavaScript fixtures)', type: :request do + before do + group.add_owner(user) + sign_in(user) + end + + it 'api/groups/projects/get.json' do + get api("/groups/#{group.id}/projects", user) + + expect(response).to be_successful + end + end end |