spec/magellan/cli/resources/deselect_spec.rb in magellan-cli-0.5.9 vs spec/magellan/cli/resources/deselect_spec.rb in magellan-cli-0.6.0
- old
+ new
@@ -63,6 +63,19 @@
expect(YAML.load_file(work_yaml)).to eq selections
end
end
end
+ describe Magellan::Cli::Resources::Organization do
+ context "select another one" do
+ it do
+ allow(subject).to receive(:get_json).
+ with("/admin/magellan~auth~organization.json", an_instance_of(Hash)).
+ and_return([{"id" => 5, "name" => "test3"}])
+ expect(YAML.load_file(work_yaml)).to include(Magellan::Cli::Resources::Project.parameter_name)
+ subject.select "test3"
+ expect(YAML.load_file(work_yaml)).to_not include(Magellan::Cli::Resources::Project.parameter_name)
+ end
+ end
+ end
+
end