Fix codestyle of announcement controller spec
This commit is contained in:
parent
a28f581aed
commit
c2b448ae8c
|
@ -24,7 +24,7 @@ describe AnnouncementController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "one announcement" do
|
context "one announcement" do
|
||||||
let!(:announcement) { Announcement.create(content: "I am announcement", user: user, starts_at: Time.current, ends_at: Time.current + 2.days) }
|
let!(:announcement) { Announcement.create(content: "I am announcement", user: user, starts_at: Time.current, ends_at: 2.days.from_now) }
|
||||||
|
|
||||||
it "includes the announcement in the @announcements assign" do
|
it "includes the announcement in the @announcements assign" do
|
||||||
subject
|
subject
|
||||||
|
@ -53,7 +53,7 @@ describe AnnouncementController, type: :controller do
|
||||||
announcement: {
|
announcement: {
|
||||||
content: "I like dogs!",
|
content: "I like dogs!",
|
||||||
starts_at: Time.current,
|
starts_at: Time.current,
|
||||||
ends_at: Time.current + 2.days
|
ends_at: 2.days.from_now
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -81,7 +81,7 @@ describe AnnouncementController, type: :controller do
|
||||||
announcement: {
|
announcement: {
|
||||||
content: "I like dogs!",
|
content: "I like dogs!",
|
||||||
starts_at: Time.current,
|
starts_at: Time.current,
|
||||||
ends_at: Time.current - 2.days
|
ends_at: 2.days.ago
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -96,8 +96,8 @@ describe AnnouncementController, type: :controller do
|
||||||
describe "#edit" do
|
describe "#edit" do
|
||||||
let! :announcement do
|
let! :announcement do
|
||||||
Announcement.create(content: "Dogs are pretty cool, I guess",
|
Announcement.create(content: "Dogs are pretty cool, I guess",
|
||||||
starts_at: Time.current + 3.days,
|
starts_at: 3.days.from_now,
|
||||||
ends_at: Time.current + 10.days,
|
ends_at: 10.days.from_now,
|
||||||
user: user)
|
user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -122,8 +122,8 @@ describe AnnouncementController, type: :controller do
|
||||||
|
|
||||||
let! :announcement do
|
let! :announcement do
|
||||||
Announcement.create(content: "Dogs are pretty cool, I guess",
|
Announcement.create(content: "Dogs are pretty cool, I guess",
|
||||||
starts_at: Time.current + 3.days,
|
starts_at: 3.days.from_now,
|
||||||
ends_at: Time.current + 10.days,
|
ends_at: 10.days.from_now,
|
||||||
user: user)
|
user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ describe AnnouncementController, type: :controller do
|
||||||
{
|
{
|
||||||
content: "I like dogs!",
|
content: "I like dogs!",
|
||||||
starts_at: Time.current,
|
starts_at: Time.current,
|
||||||
ends_at: Time.current - 2.days
|
ends_at: 2.days.ago
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -177,8 +177,8 @@ describe AnnouncementController, type: :controller do
|
||||||
describe "#destroy" do
|
describe "#destroy" do
|
||||||
let! :announcement do
|
let! :announcement do
|
||||||
Announcement.create(content: "Dogs are pretty cool, I guess",
|
Announcement.create(content: "Dogs are pretty cool, I guess",
|
||||||
starts_at: Time.current + 3.days,
|
starts_at: 3.days.from_now,
|
||||||
ends_at: Time.current + 10.days,
|
ends_at: 10.days.from_now,
|
||||||
user: user)
|
user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -198,4 +198,3 @@ describe AnnouncementController, type: :controller do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue