Commit ededfd2d29bea4fff7c69634dc813c274eb346ee

Authored by Dmitriy Zaporozhets
1 parent ee750298

Fix tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 6 additions and 10 deletions   Show diff stats
spec/features/issues_spec.rb
@@ -186,7 +186,7 @@ describe &quot;Issues&quot; do @@ -186,7 +186,7 @@ describe &quot;Issues&quot; do
186 find('.edit-issue.inline-update #issue_assignee_id').set project.team.members.first.id 186 find('.edit-issue.inline-update #issue_assignee_id').set project.team.members.first.id
187 click_button 'Update Issue' 187 click_button 'Update Issue'
188 188
189 - page.should have_content "currently assigned to" 189 + page.should have_content "Assignee:"
190 page.has_select?('issue_assignee_id', :selected => project.team.members.first.name) 190 page.has_select?('issue_assignee_id', :selected => project.team.members.first.name)
191 end 191 end
192 end 192 end
@@ -206,11 +206,9 @@ describe &quot;Issues&quot; do @@ -206,11 +206,9 @@ describe &quot;Issues&quot; do
206 login_with guest 206 login_with guest
207 207
208 visit project_issue_path(project, issue) 208 visit project_issue_path(project, issue)
209 - page.should have_content "currently assigned to #{issue.assignee.name}"  
210 - 209 + page.should have_content issue.assignee.name
211 end 210 end
212 end 211 end
213 -  
214 end 212 end
215 213
216 describe 'update milestone from issue#show' do 214 describe 'update milestone from issue#show' do
@@ -225,17 +223,16 @@ describe &quot;Issues&quot; do @@ -225,17 +223,16 @@ describe &quot;Issues&quot; do
225 find('.edit-issue.inline-update').select(milestone.title, from: 'issue_milestone_id') 223 find('.edit-issue.inline-update').select(milestone.title, from: 'issue_milestone_id')
226 click_button 'Update Issue' 224 click_button 'Update Issue'
227 225
228 - page.should have_content "Attached to milestone" 226 + page.should have_content "Milestone"
229 page.has_select?('issue_assignee_id', :selected => milestone.title) 227 page.has_select?('issue_assignee_id', :selected => milestone.title)
230 end 228 end
231 end 229 end
232 230
233 context 'by unauthorized user' do 231 context 'by unauthorized user' do
234 -  
235 let(:guest) { create(:user) } 232 let(:guest) { create(:user) }
236 233
237 before :each do 234 before :each do
238 - project.team << [[guest], :guest] 235 + project.team << [guest, :guest]
239 issue.milestone = milestone 236 issue.milestone = milestone
240 issue.save 237 issue.save
241 end 238 end
@@ -245,8 +242,7 @@ describe &quot;Issues&quot; do @@ -245,8 +242,7 @@ describe &quot;Issues&quot; do
245 login_with guest 242 login_with guest
246 243
247 visit project_issue_path(project, issue) 244 visit project_issue_path(project, issue)
248 -  
249 - page.should have_content "Attached to milestone #{milestone.title}" 245 + page.should have_content milestone.title
250 end 246 end
251 end 247 end
252 end 248 end
@@ -258,4 +254,4 @@ describe &quot;Issues&quot; do @@ -258,4 +254,4 @@ describe &quot;Issues&quot; do
258 def last_issue 254 def last_issue
259 all("ul.issues-list li").last.text 255 all("ul.issues-list li").last.text
260 end 256 end
261 -end  
262 \ No newline at end of file 257 \ No newline at end of file
  258 +end