Commit e9f1c39e7e258e58fa79a8646c3ad224119a0ae5
1 parent
9acaec7a
Exists in
master
and in
4 other branches
Fix tests
Showing
2 changed files
with
15 additions
and
15 deletions
Show diff stats
spec/features/gitlab_flavored_markdown_spec.rb
... | ... | @@ -11,7 +11,7 @@ describe "GitLab Flavored Markdown" do |
11 | 11 | end |
12 | 12 | |
13 | 13 | before do |
14 | - Commit.any_instance.stub(title: "fix ##{issue.id}\n\nask @#{fred.username} for details") | |
14 | + Commit.any_instance.stub(title: "fix ##{issue.iid}\n\nask @#{fred.username} for details") | |
15 | 15 | end |
16 | 16 | |
17 | 17 | let(:commit) { project.repository.commit } |
... | ... | @@ -25,13 +25,13 @@ describe "GitLab Flavored Markdown" do |
25 | 25 | it "should render title in commits#index" do |
26 | 26 | visit project_commits_path(project, 'master', limit: 1) |
27 | 27 | |
28 | - page.should have_link("##{issue.id}") | |
28 | + page.should have_link("##{issue.iid}") | |
29 | 29 | end |
30 | 30 | |
31 | 31 | it "should render title in commits#show" do |
32 | 32 | visit project_commit_path(project, commit) |
33 | 33 | |
34 | - page.should have_link("##{issue.id}") | |
34 | + page.should have_link("##{issue.iid}") | |
35 | 35 | end |
36 | 36 | |
37 | 37 | it "should render description in commits#show" do |
... | ... | @@ -43,7 +43,7 @@ describe "GitLab Flavored Markdown" do |
43 | 43 | it "should render title in repositories#branches" do |
44 | 44 | visit project_branches_path(project) |
45 | 45 | |
46 | - page.should have_link("##{issue.id}") | |
46 | + page.should have_link("##{issue.iid}") | |
47 | 47 | end |
48 | 48 | end |
49 | 49 | |
... | ... | @@ -57,20 +57,20 @@ describe "GitLab Flavored Markdown" do |
57 | 57 | author: @user, |
58 | 58 | assignee: @user, |
59 | 59 | project: project, |
60 | - title: "fix ##{@other_issue.id}", | |
60 | + title: "fix ##{@other_issue.iid}", | |
61 | 61 | description: "ask @#{fred.username} for details") |
62 | 62 | end |
63 | 63 | |
64 | 64 | it "should render subject in issues#index" do |
65 | 65 | visit project_issues_path(project) |
66 | 66 | |
67 | - page.should have_link("##{@other_issue.id}") | |
67 | + page.should have_link("##{@other_issue.iid}") | |
68 | 68 | end |
69 | 69 | |
70 | 70 | it "should render subject in issues#show" do |
71 | 71 | visit project_issue_path(project, @issue) |
72 | 72 | |
73 | - page.should have_link("##{@other_issue.id}") | |
73 | + page.should have_link("##{@other_issue.iid}") | |
74 | 74 | end |
75 | 75 | |
76 | 76 | it "should render details in issues#show" do |
... | ... | @@ -83,19 +83,19 @@ describe "GitLab Flavored Markdown" do |
83 | 83 | |
84 | 84 | describe "for merge requests" do |
85 | 85 | before do |
86 | - @merge_request = create(:merge_request, source_project: project, target_project: project, title: "fix ##{issue.id}") | |
86 | + @merge_request = create(:merge_request, source_project: project, target_project: project, title: "fix ##{issue.iid}") | |
87 | 87 | end |
88 | 88 | |
89 | 89 | it "should render title in merge_requests#index" do |
90 | 90 | visit project_merge_requests_path(project) |
91 | 91 | |
92 | - page.should have_link("##{issue.id}") | |
92 | + page.should have_link("##{issue.iid}") | |
93 | 93 | end |
94 | 94 | |
95 | 95 | it "should render title in merge_requests#show" do |
96 | 96 | visit project_merge_request_path(project, @merge_request) |
97 | 97 | |
98 | - page.should have_link("##{issue.id}") | |
98 | + page.should have_link("##{issue.iid}") | |
99 | 99 | end |
100 | 100 | end |
101 | 101 | |
... | ... | @@ -104,20 +104,20 @@ describe "GitLab Flavored Markdown" do |
104 | 104 | before do |
105 | 105 | @milestone = create(:milestone, |
106 | 106 | project: project, |
107 | - title: "fix ##{issue.id}", | |
107 | + title: "fix ##{issue.iid}", | |
108 | 108 | description: "ask @#{fred.username} for details") |
109 | 109 | end |
110 | 110 | |
111 | 111 | it "should render title in milestones#index" do |
112 | 112 | visit project_milestones_path(project) |
113 | 113 | |
114 | - page.should have_link("##{issue.id}") | |
114 | + page.should have_link("##{issue.iid}") | |
115 | 115 | end |
116 | 116 | |
117 | 117 | it "should render title in milestones#show" do |
118 | 118 | visit project_milestone_path(project, @milestone) |
119 | 119 | |
120 | - page.should have_link("##{issue.id}") | |
120 | + page.should have_link("##{issue.iid}") | |
121 | 121 | end |
122 | 122 | |
123 | 123 | it "should render description in milestones#show" do | ... | ... |
spec/models/project_spec.rb
... | ... | @@ -201,11 +201,11 @@ describe Project do |
201 | 201 | let(:ext_project) { create(:redmine_project) } |
202 | 202 | |
203 | 203 | it "should be true or if used internal tracker and issue exists" do |
204 | - project.issue_exists?(existed_issue.id).should be_true | |
204 | + project.issue_exists?(existed_issue.iid).should be_true | |
205 | 205 | end |
206 | 206 | |
207 | 207 | it "should be false or if used internal tracker and issue not exists" do |
208 | - project.issue_exists?(not_existed_issue.id).should be_false | |
208 | + project.issue_exists?(not_existed_issue.iid).should be_false | |
209 | 209 | end |
210 | 210 | |
211 | 211 | it "should always be true if used other tracker" do | ... | ... |