@@ -38,7 +38,7 @@ describe "User views milestones" do
end
context"with associated releases"do
set(:first_release){create(:release,project: project,name: "The first release",milestones: [milestone],released_at: Time.zone.parse('2019-10-07'))}
let_it_be(:first_release){create(:release,project: project,name: "The first release",milestones: [milestone],released_at: Time.zone.parse('2019-10-07'))}
context"with a single associated release"do
it"shows the associated release"do
...
...
@@ -48,10 +48,10 @@ describe "User views milestones" do
end
context"with lots of associated releases"do
set(:second_release){create(:release,project: project,name: "The second release",milestones: [milestone],released_at: first_release.released_at+1.day)}
set(:third_release){create(:release,project: project,name: "The third release",milestones: [milestone],released_at: second_release.released_at+1.day)}
set(:fourth_release){create(:release,project: project,name: "The fourth release",milestones: [milestone],released_at: third_release.released_at+1.day)}
set(:fifth_release){create(:release,project: project,name: "The fifth release",milestones: [milestone],released_at: fourth_release.released_at+1.day)}
let_it_be(:second_release){create(:release,project: project,name: "The second release",milestones: [milestone],released_at: first_release.released_at+1.day)}
let_it_be(:third_release){create(:release,project: project,name: "The third release",milestones: [milestone],released_at: second_release.released_at+1.day)}
let_it_be(:fourth_release){create(:release,project: project,name: "The fourth release",milestones: [milestone],released_at: third_release.released_at+1.day)}
let_it_be(:fifth_release){create(:release,project: project,name: "The fifth release",milestones: [milestone],released_at: fourth_release.released_at+1.day)}
it"shows the associated releases and the truncation text"do
expect(page).tohave_content("Releases #{fifth_release.name} • #{fourth_release.name} • #{third_release.name} • 2 more releases")
...
...
@@ -66,9 +66,9 @@ describe "User views milestones" do
set(:current_user){create(:user)}# Using `current_user` instead of just `user` because of the hardoced call in `assigned_mrs_dashboard_path` which is used below.
let_it_be(:current_user){create(:user)}# Using `current_user` instead of just `user` because of the hardoced call in `assigned_mrs_dashboard_path` which is used below.