Reorder a test to prepare for a future one
This commit is contained in:
parent
b4eb382e26
commit
968952ff46
1 changed files with 2 additions and 4 deletions
|
@ -1,20 +1,18 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe CommentaireHelper, type: :helper do
|
RSpec.describe CommentaireHelper, type: :helper do
|
||||||
describe ".commentaire_is_from_me_class" do
|
let(:commentaire) { create(:commentaire, email: "michel@pref.fr") }
|
||||||
let(:commentaire) { create(:commentaire, email: "michel@pref.fr") }
|
|
||||||
|
|
||||||
|
describe ".commentaire_is_from_me_class" do
|
||||||
subject { commentaire_is_from_me_class(commentaire, me) }
|
subject { commentaire_is_from_me_class(commentaire, me) }
|
||||||
|
|
||||||
context "when commentaire is from me" do
|
context "when commentaire is from me" do
|
||||||
let(:me) { "michel@pref.fr" }
|
let(:me) { "michel@pref.fr" }
|
||||||
|
|
||||||
it { is_expected.to eq("from-me") }
|
it { is_expected.to eq("from-me") }
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when commentaire is not from me" do
|
context "when commentaire is not from me" do
|
||||||
let(:me) { "roger@usager.fr" }
|
let(:me) { "roger@usager.fr" }
|
||||||
|
|
||||||
it { is_expected.to eq nil }
|
it { is_expected.to eq nil }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue