-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
109 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
describe InnerPlan::List do | ||
subject { build(:list) } | ||
|
||
context "when sub" do | ||
subject { create(:list, list: parent) } | ||
|
||
let(:parent) { create(:list) } | ||
|
||
it "touches parent list" do | ||
parent.update!(updated_at: 1.year.ago) | ||
expect { subject }.to change { parent.reload.updated_at } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
describe InnerPlan::Task do | ||
subject { build(:task) } | ||
|
||
context "when belongs to root list" do | ||
subject { create(:task, list: list) } | ||
|
||
let(:list) { create(:list) } | ||
|
||
it "touches parent list" do | ||
list.update!(updated_at: 1.year.ago) | ||
expect { subject }.to change { list.reload.updated_at } | ||
end | ||
end | ||
|
||
context "when belongs to sub list" do | ||
subject { create(:task, list: list) } | ||
|
||
let(:root_list) { create(:list) } | ||
let(:list) { create(:list, list: root_list) } | ||
|
||
it "touches sub list" do | ||
list.update!(updated_at: 1.year.ago) | ||
expect { subject }.to change { list.reload.updated_at } | ||
end | ||
|
||
it "touches root list" do | ||
root_list.update!(updated_at: 1.year.ago) | ||
expect { subject }.to change { root_list.reload.updated_at } | ||
end | ||
end | ||
end |
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.