Skip to content

Commit

Permalink
Fix spec descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
treagod committed Nov 4, 2024
1 parent c4c34db commit c4cd504
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/marten/db/field/one_to_one_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -281,16 +281,16 @@ describe Marten::DB::Field::OneToOne do
comment.article_id.should eq article.id!.hexstring
end

it "works as expected when target models don't involve interger pk fields" do
it "retrieves the related article object for the comment in a one-to-one association without bang operator" do
article = Marten::DB::Field::OneToOneSpec::Article.create!(title: "This is an article", body: "This is a test")
Marten::DB::Field::OneToOneSpec::Comment.create!(article: article, text: "This article is dope")

article = Marten::DB::Field::OneToOneSpec::Article.get(id: article.id).not_nil!

article.comment!.get_related_object_variable(:article).should_not be_nil
article.comment.not_nil!.get_related_object_variable(:article).should_not be_nil
end

it "retrieves the related article object for the comment in a one-to-one association" do
it "retrieves the related article object for the comment in a one-to-one association with bang operator!" do
article = Marten::DB::Field::OneToOneSpec::Article.create!(title: "This is an article", body: "This is a test")
Marten::DB::Field::OneToOneSpec::Comment.create!(article: article, text: "This article is dope")

Expand Down

0 comments on commit c4cd504

Please sign in to comment.