summaryrefslogtreecommitdiff
path: root/spec/models/service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/service_spec.rb')
-rw-r--r--spec/models/service_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb
index a213ffe6c4b..da87ea5b84f 100644
--- a/spec/models/service_spec.rb
+++ b/spec/models/service_spec.rb
@@ -103,4 +103,27 @@ describe Service do
end
end
end
+
+ describe "#prop_updated?" do
+ let(:service) do
+ BambooService.create(
+ project: create(:project),
+ properties: {
+ bamboo_url: 'http://gitlab.com',
+ username: 'mic',
+ password: "password"
+ }
+ )
+ end
+
+ it "returns false" do
+ service.username = "key_changed"
+ expect(service.prop_updated?(:bamboo_url)).to be_falsy
+ end
+
+ it "returns true" do
+ service.bamboo_url = "http://other.com"
+ expect(service.prop_updated?(:bamboo_url)).to be_truthy
+ end
+ end
end