summaryrefslogtreecommitdiff
path: root/spec/models/event_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/event_spec.rb')
-rw-r--r--spec/models/event_spec.rb27
1 files changed, 13 insertions, 14 deletions
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb
index 1fdd959da9d..0f32f162a10 100644
--- a/spec/models/event_spec.rb
+++ b/spec/models/event_spec.rb
@@ -18,16 +18,16 @@ require 'spec_helper'
describe Event do
describe "Associations" do
- it { should belong_to(:project) }
- it { should belong_to(:target) }
+ it { is_expected.to belong_to(:project) }
+ it { is_expected.to belong_to(:target) }
end
describe "Respond to" do
- it { should respond_to(:author_name) }
- it { should respond_to(:author_email) }
- it { should respond_to(:issue_title) }
- it { should respond_to(:merge_request_title) }
- it { should respond_to(:commits) }
+ it { is_expected.to respond_to(:author_name) }
+ it { is_expected.to respond_to(:author_email) }
+ it { is_expected.to respond_to(:issue_title) }
+ it { is_expected.to respond_to(:merge_request_title) }
+ it { is_expected.to respond_to(:commits) }
end
describe "Push event" do
@@ -36,7 +36,7 @@ describe Event do
@user = project.owner
data = {
- before: "0000000000000000000000000000000000000000",
+ before: Gitlab::Git::BLANK_SHA,
after: "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e",
ref: "refs/heads/master",
user_id: @user.id,
@@ -58,11 +58,10 @@ describe Event do
)
end
- it { @event.push?.should be_true }
- it { @event.proper?.should be_true }
- it { @event.new_branch?.should be_true }
- it { @event.tag?.should be_false }
- it { @event.branch_name.should == "master" }
- it { @event.author.should == @user }
+ it { expect(@event.push?).to be_truthy }
+ it { expect(@event.proper?).to be_truthy }
+ it { expect(@event.tag?).to be_falsey }
+ it { expect(@event.branch_name).to eq("master") }
+ it { expect(@event.author).to eq(@user) }
end
end