Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Bramjetten committed Aug 22, 2023
1 parent 919e649 commit ad505ca
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions test/models/spina/navigation_item_test.rb
Original file line number Diff line number Diff line change
@@ -167,30 +167,5 @@ class NavigationItemTest < ActiveSupport::TestCase
assert_equal navigation_item.materialized_path, navigation_item.url
end

test "when changing kind from url to page the url and url_title are cleared out" do
page = FactoryBot.create(:page, title: "Title")
navigation_item = FactoryBot.create(:navigation_item, kind: :url, url: "URL", url_title: "Title")

navigation_item.kind = :page
navigation_item.page = page

navigation_item.save

assert_nil navigation_item.url
assert_nil navigation_item.url_title
end

test "when changing kind from page to url the page is cleared out" do
page = FactoryBot.create(:page, title: "Title")
navigation_item = FactoryBot.create(:navigation_item, kind: :page, page: page)

navigation_item.kind = :url
navigation_item.url = "URL"
navigation_item.url_title = "Title"

navigation_item.save

assert_nil navigation_item.page
end
end
end

0 comments on commit ad505ca

Please sign in to comment.