Sha256: f1f3e6408e556079c16473831de518ab362f3282e38ecb61d25a08de6ec62c15
Contents?: true
Size: 1.45 KB
Versions: 1
Compression:
Stored size: 1.45 KB
Contents
require 'spec_helper' require 'gerd/model/model' require 'gerd/inspections/diffs/organisation' describe "organisation diff" do context "states match" do expected = Gerd::Model::GithubState.new( { "organisation" => "Test organisation", "teams" => {}, "members" => {}, "repositories" => {} }) actual = Gerd::Model::GithubState.new( { "organisation" => "Test organisation", "teams" => {}, "members" => {}, "repositories" => {} }) diff = Gerd::Inspections::Organisation::inspect_organisations(expected, actual) it "should spot same organisations" do expect(diff.passed).to be true end it "should give us no actions" do expect(diff.actions.length).to be 0 end end context "states do not match" do expected = Gerd::Model::GithubState.new( { "organisation" => "Test organisation", "teams" => {}, "members" => {}, "repositories" => {} }) actual = Gerd::Model::GithubState.new( { "organisation" => "Other organisation", "teams" => {}, "members" => {}, "repositories" => {} }) diff = Gerd::Inspections::Organisation::inspect_organisations(expected, actual) it "should spot different organisations" do expect(diff.passed).to be false end it "should give us a name change action" do expect(diff.actions.length).to be 1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gerd-0.0.1 | spec/organisation_spec.rb |