On Mon, Apr 18, 2011 at 09:22:56PM +0100, mtaylor(a)redhat.com wrote:
From: Martyn Taylor <mtaylor(a)redhat.com>
---
src/features/step_definitions/template_steps.rb | 4 +++-
src/spec/fixtures/packagesearch_libdeltacloud.json | 18 ++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletions(-)
create mode 100644 src/spec/fixtures/packagesearch_libdeltacloud.json
diff --git a/src/features/step_definitions/template_steps.rb
b/src/features/step_definitions/template_steps.rb
index 0e78a47..d888ba7 100644
--- a/src/features/step_definitions/template_steps.rb
+++ b/src/features/step_definitions/template_steps.rb
@@ -13,7 +13,9 @@ Given /^There is a mock pulp repository$/ do
hydra.stub(:get,
"http://pulptest/repositories/fedora/packagegroupcategories/").and_return(
Typhoeus::Response.new(:code => 200,
:body => File.read(File.join(dir,
'packagegroupcategories.json'))))
-
+ hydra.stub(:get,
"http://pulptest/repositories/fedora/packages/?name=libdeltacloud").and_return(
+ Typhoeus::Response.new(:code => 200,
+ :body => File.read(File.join(dir,
'packagesearch_libdeltacloud.json'))))
end
Given /^there is a "([^"]*)" template$/ do |name|
diff --git a/src/spec/fixtures/packagesearch_libdeltacloud.json
b/src/spec/fixtures/packagesearch_libdeltacloud.json
new file mode 100644
index 0000000..f7cd359
--- /dev/null
+++ b/src/spec/fixtures/packagesearch_libdeltacloud.json
@@ -0,0 +1,18 @@
+[ { "_id" : "ad9d9738-6756-4e2a-9258-6aff01f98daf",
+ "_ns" : "packages",
+ "arch" : "src",
+ "checksum" : { "sha256" :
"ddecd306f32c90323ed4a9c5064f4fe971b24f7adcf0c6cb9cab936a4ac080b3" },
+ "description" : "Libdeltacloud is a library for accessing deltacloud
via a\nconvenient C API.",
+ "download_url" :
"http://localhost//pub/deltacloud/libdeltacloud-0.3-1.fc12.src.rpm",
+ "epoch" : "0",
+ "filename" : "libdeltacloud-0.3-1.fc12.src.rpm",
+ "id" : "ad9d9738-6756-4e2a-9258-6aff01f98daf",
+ "name" : "libdeltacloud",
+ "provides" : [ ],
+ "release" : "1.fc12",
+ "requires" : [ "libcurl-devel",
+ "libxml2-devel"
+ ],
+ "vendor" : null,
+ "version" : "0.3"
+ }]
\ No newline at end of file
ACK and pushed to next.
-- Matt