summaryrefslogtreecommitdiff
path: root/spec/controllers/projects/templates_controller_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-311-6/+6
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-281-2/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-181-0/+40
|
* Cleanup usages of `JSON.parse` in specsPeter Leitzen2019-07-161-5/+4
| | | | Prefer `json_response` where applicable.
* Authorize access before serving project templateLuke Duncalfe2019-06-111-29/+81
| | | | | | | | | | | | | | | | | | | | | Previously, if a user was a guest member of a private project, they could access the merge request template as we were not checking permission-levels of the user. When a issue template is asked for, the user must have :read_issue for the project; or :read_merge_request when a merge request template is asked for. We also now rescue_from FileNotFoundError and handle as 404. This is because RepoTemplateFinder can raise a FileNotFoundError exception, which Rails previously handled as a 500. Handling these in a way that is consistent with ActiveRecord::RecordNotFound exceptions, within controllers that inherit from Projects::ApplicationController at least, and returning a 404. https://gitlab.com/gitlab-org/gitlab-ce/issues/54943
* Add some frozen string to spec/**/*.rbgfyoung2019-04-151-0/+2
| | | | | | | | | | Adds frozen string to the following: * spec/bin/**/*.rb * spec/config/**/*.rb * spec/controllers/**/*.rb xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Update specs to rails5 formatblackst0ne-convert-specs-rails5-styleblackst0ne2018-12-191-4/+4
| | | | | | | | | | Updates specs to use new rails5 format. The old format: `get :show, { some: params }, { some: headers }` The new format: `get :show, params: { some: params }, headers: { some: headers }`
* Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-111-1/+1
|
* Replace '.team << [user, role]' with 'add_role(user)' in specs36782-replace-team-user-role-with-add_role-user-in-specsblackst0ne2017-12-221-1/+1
|
* Rename commit_file, commit_dir and remove_file and update specsDouwe Maan2017-02-241-2/+2
|
* Use Namespace#full_path instead of #path where appropriatedm-more-namespace-full-pathDouwe Maan2017-02-231-4/+4
|
* Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-01-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: Ensure we have a project with a repo in GitlabMarkdownHelper specs Revert "Make sure TraceReader uses Encoding.default_external" Make sure TraceReader uses Encoding.default_external Update CONTRIBUTING.md after merging "up-for-grabs" and "Accepting Merge Requests" [ci skip] Use `:empty_project` where possible in finder specs Use `empty_project` where possible in controller specs Use `:empty_project` where possible in helper specs Don’t count tasks that are not defined as list items correctly Use a project factory with a repository where necessary Use `:empty_project` where possible throughout spec/lib Use hashrocket for dasherized attribute Remove markdown file extension and add anchor to link Fixed builds info link on project settings page Factories with a project association use `:empty_project` by default Update enviroments.md the example for deleting an environment is missing the "s" in environments. curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environments/1" wil 404
| * Use `empty_project` where possible in controller specsrs-empty_project-controllersRobert Speicher2017-01-251-1/+1
| |
* | Fix tests to use the new APILin Jen-Shin2016-12-081-1/+2
|/
* Allow Member.add_user to handle access requestersRémy Coutable2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
* Load issues and merge requests templates from repositoryFelipe Artur2016-08-161-0/+48