Commit 0ec40a68 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'rs-spec-parity' into 'master'

Partial CE-EE parity for specs

See merge request gitlab-org/gitlab-ce!31119
parents ba997f3c d85c3f35
...@@ -126,7 +126,7 @@ describe "Private Project Access" do ...@@ -126,7 +126,7 @@ describe "Private Project Access" do
describe "GET /:project_path/blob" do describe "GET /:project_path/blob" do
let(:commit) { project.repository.commit } let(:commit) { project.repository.commit }
subject { project_blob_path(project, File.join(commit.id, '.gitignore'))} subject { project_blob_path(project, File.join(commit.id, '.gitignore')) }
it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:admin) }
it { is_expected.to be_allowed_for(:owner).of(project) } it { is_expected.to be_allowed_for(:owner).of(project) }
......
{ {
"type": "object", "type": "object",
"required": ["dashboard", "priority", "panel_groups"], "required": [
"dashboard",
"priority",
"panel_groups"
],
"properties": { "properties": {
"dashboard": { "type": "string" }, "dashboard": { "type": "string" },
"priority": { "type": "number" }, "priority": { "type": "number" },
......
...@@ -574,7 +574,7 @@ describe QuickActions::InterpretService do ...@@ -574,7 +574,7 @@ describe QuickActions::InterpretService do
context 'Issue' do context 'Issue' do
it 'populates assignee_ids: [] if content contains /unassign' do it 'populates assignee_ids: [] if content contains /unassign' do
issue.update(assignee_ids: [developer.id]) issue.update!(assignee_ids: [developer.id])
_, updates = service.execute(content, issue) _, updates = service.execute(content, issue)
expect(updates).to eq(assignee_ids: []) expect(updates).to eq(assignee_ids: [])
...@@ -583,7 +583,7 @@ describe QuickActions::InterpretService do ...@@ -583,7 +583,7 @@ describe QuickActions::InterpretService do
context 'Merge Request' do context 'Merge Request' do
it 'populates assignee_ids: [] if content contains /unassign' do it 'populates assignee_ids: [] if content contains /unassign' do
merge_request.update(assignee_ids: [developer.id]) merge_request.update!(assignee_ids: [developer.id])
_, updates = service.execute(content, merge_request) _, updates = service.execute(content, merge_request)
expect(updates).to eq(assignee_ids: []) expect(updates).to eq(assignee_ids: [])
......
...@@ -12,6 +12,7 @@ describe 'projects/merge_requests/creations/_new_submit.html.haml' do ...@@ -12,6 +12,7 @@ describe 'projects/merge_requests/creations/_new_submit.html.haml' do
assign(:hidden_commit_count, 0) assign(:hidden_commit_count, 0)
assign(:total_commit_count, merge_request.commits.count) assign(:total_commit_count, merge_request.commits.count)
assign(:project, merge_request.target_project) assign(:project, merge_request.target_project)
assign(:target_project, merge_request.target_project)
assign(:mr_presenter, merge_request.present(current_user: merge_request.author)) assign(:mr_presenter, merge_request.present(current_user: merge_request.author))
allow(view).to receive(:can?).and_return(true) allow(view).to receive(:can?).and_return(true)
......
...@@ -23,6 +23,7 @@ describe 'projects/merge_requests/edit.html.haml' do ...@@ -23,6 +23,7 @@ describe 'projects/merge_requests/edit.html.haml' do
before do before do
assign(:project, project) assign(:project, project)
assign(:target_project, project)
assign(:merge_request, closed_merge_request) assign(:merge_request, closed_merge_request)
assign(:mr_presenter, closed_merge_request.present(current_user: user)) assign(:mr_presenter, closed_merge_request.present(current_user: user))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment