Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Merge 0d2a397 into b5844e4
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Sep 13, 2018
2 parents b5844e4 + 0d2a397 commit 51537ef
Show file tree
Hide file tree
Showing 16 changed files with 463 additions and 292 deletions.
4 changes: 3 additions & 1 deletion spec/account_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# frozen_string_literal: true

describe Censys::API do
before(:context) do
@api = Censys::API.new
end

describe "#account", :vcr do
it "should return an Account instance" do
it "should return an Account" do
account = @api.account
expect(account).to be_a(Censys::Account)
expect(account.quota).to be_a(Censys::Account::Quota)
Expand Down
3 changes: 0 additions & 3 deletions spec/censys_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'
require 'censys'

describe Censys do
it "should have a VERSION constant" do
expect(subject.const_get('VERSION')).to_not be_empty
Expand Down
8 changes: 3 additions & 5 deletions spec/data_spec.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe Censys::API do
before(:context) do
@api = Censys::API.new
end

describe "#data", :vcr do
context "series_list" do
it "should return SeriesList response" do
it "should return a Data::SeriesList" do
data = @api.data
expect(data).to be_a(Censys::Data::SeriesList)
expect(data.primary_series).to be_a(Hash)
Expand All @@ -18,7 +16,7 @@
end

context "series" do
it "should return Series response" do
it "should return a Data::Series" do
series = @api.data(series: "22-ssh-banner-full_ipv4")
expect(series).to be_a(Censys::Data::Series)
expect(series.id).to eq("22-ssh-banner-full_ipv4")
Expand All @@ -33,7 +31,7 @@
end

context "result" do
it "should return Result response" do
it "should return a Data::Result" do
result = @api.data(series: "22-ssh-banner-full_ipv4", result: "20150930T0056")
expect(result).to be_a(Censys::Data::Result)
expect(result.id).to eq("20150930T0056")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 51537ef

Please sign in to comment.