summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-12-11 14:37:16 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-12-11 18:02:10 +0100
commitdd8102f2d1acd803793777b26c84d7c6e977b8e2 (patch)
tree42be96d61c921b6fa76e05fc3c796b5af62a976d /spec/models
parent513d551c8f7078e263d31ef2c30a1f72cbab3fae (diff)
downloadgitlab-ce-dd8102f2d1acd803793777b26c84d7c6e977b8e2.tar.gz
Fix specs
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/build_spec.rb2
-rw-r--r--spec/models/commit_status_spec.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb
index 1fd475d205e..96b6f1dbca6 100644
--- a/spec/models/build_spec.rb
+++ b/spec/models/build_spec.rb
@@ -386,7 +386,7 @@ describe Ci::Build, models: true do
it { is_expected.to be_a(String) }
it { is_expected.to end_with(".git") }
it { is_expected.to start_with(project.web_url[0..6]) }
- it { is_expected.to include(project.token) }
+ it { is_expected.to include(build.token) }
it { is_expected.to include('gitlab-ci-token') }
it { is_expected.to include(project.web_url[7..-1]) }
end
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb
index 6131191f0fa..b8f901b3433 100644
--- a/spec/models/commit_status_spec.rb
+++ b/spec/models/commit_status_spec.rb
@@ -39,12 +39,13 @@ describe CommitStatus, models: true do
it { is_expected.to belong_to(:commit) }
it { is_expected.to belong_to(:user) }
+ it { is_expected.to belong_to(:project) }
+
it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_inclusion_of(:status).in_array(%w(pending running failed success canceled)) }
it { is_expected.to delegate_method(:sha).to(:commit) }
it { is_expected.to delegate_method(:short_sha).to(:commit) }
- it { is_expected.to delegate_method(:project).to(:commit) }
it { is_expected.to respond_to :success? }
it { is_expected.to respond_to :failed? }