diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-26 04:42:46 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-26 04:42:46 +0300 |
commit | 046b28312704f3131e72dcd2dbdacc5264d4aa62 (patch) | |
tree | a8c2b14a6e1db3b662fee2c79af70d9fcb643c2e /spec/ci/models/service_spec.rb | |
parent | e449426a4e7d15cdd582d4f136add52cbfb5e04e (diff) |
Groundwork for merging CI into CE
Diffstat (limited to 'spec/ci/models/service_spec.rb')
-rw-r--r-- | spec/ci/models/service_spec.rb | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/spec/ci/models/service_spec.rb b/spec/ci/models/service_spec.rb new file mode 100644 index 00000000000..22a49e10a6c --- /dev/null +++ b/spec/ci/models/service_spec.rb @@ -0,0 +1,49 @@ +# == Schema Information +# +# Table name: services +# +# id :integer not null, primary key +# type :string(255) +# title :string(255) +# project_id :integer not null +# created_at :datetime +# updated_at :datetime +# active :boolean default(FALSE), not null +# properties :text +# + +require 'spec_helper' + +describe Service do + + describe "Associations" do + it { should belong_to :project } + end + + describe "Mass assignment" do + end + + describe "Test Button" do + before do + @service = Service.new + end + + describe "Testable" do + let (:project) { FactoryGirl.create :project } + let (:commit) { FactoryGirl.create :commit, project: project } + let (:build) { FactoryGirl.create :build, commit: commit } + + before do + @service.stub( + project: project + ) + build + @testable = @service.can_test? + end + + describe :can_test do + it { @testable.should == true } + end + end + end +end |