Sha256: 2f665f3fa4b929f1ea8149ba2c253d8fe07693759f7f932b76d4beb29e01332f

Contents?: true

Size: 854 Bytes

Versions: 4

Compression:

Stored size: 854 Bytes

Contents

require 'spec_helper'

module Hubstats
  describe Repo, :type => :model do
  	it 'should create a repo' do
  		repo_hash = {id: 131242,
  		             owner_id: 3728684,
  		             name: "example_name",
  		             full_name: "sportngin/example_name",
  		             pushed_at: "2015-05-27 13:51:21 -0500",
  		             created_at: "2009-05-27 06:27:04 -0500",
  		             updated_at: "2015-03-26 16:17:19 -0500"}
  		repo = Repo.create(repo_hash)
  		expect(repo.id).to eq(repo_hash[:id])
  		expect(repo.owner).to eq(repo_hash[:owner])
  		expect(repo.name).to eq(repo_hash[:name])
  		expect(repo.full_name).to eq(repo_hash[:full_name])
  		expect(repo.pushed_at).to eq(repo_hash[:pushed_at])
  		expect(repo.created_at).to eq(repo_hash[:created_at])
  		expect(repo.updated_at).to eq(repo_hash[:updated_at])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hubstats-0.3.4 spec/models/hubstats/repo_spec.rb
hubstats-0.3.3 spec/models/hubstats/repo_spec.rb
hubstats-0.3.2 spec/models/hubstats/repo_spec.rb
hubstats-0.3.1 spec/models/hubstats/repo_spec.rb