Sha256: 3f87f9bba44417c07060b6d60d559a48b646dc902dd02e63c46daa1dfff09b09

Contents?: true

Size: 899 Bytes

Versions: 21

Compression:

Stored size: 899 Bytes

Contents

require 'spec_helper'

module Hubstats
  describe Comment, :type => :model do
    it 'should create and return a comment and user' do
      github_user = {:login => "elliothursh",
                     :id => 10,
                    :type => "User"}
      github_comment = {:user => github_user,
                        :pull_request_url => "www.pull.com",
                        :id => 100}
      github_repo = {:id => 151,
                     :name => "HelloWorld"}
      pull_request = {:id => 1000,
                      :url => "www.pull.com",
                      :repository => github_repo,
                      :user => github_user}
      repo = Repo.create_or_update(github_repo)
      pull = PullRequest.create_or_update(pull_request)
      comment = Comment.create_or_update(github_comment)
      expect(comment.id).to eq(100)
      expect(comment.user_id).to eq(10)
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
hubstats-0.5.4 spec/models/hubstats/comment_spec.rb
hubstats-0.5.3 spec/models/hubstats/comment_spec.rb
hubstats-0.5.2 spec/models/hubstats/comment_spec.rb
hubstats-0.5.1 spec/models/hubstats/comment_spec.rb
hubstats-0.5.0 spec/models/hubstats/comment_spec.rb
hubstats-0.4.4 spec/models/hubstats/comment_spec.rb
hubstats-0.4.2 spec/models/hubstats/comment_spec.rb
hubstats-0.4.1 spec/models/hubstats/comment_spec.rb
hubstats-0.3.17 spec/models/hubstats/comment_spec.rb
hubstats-0.3.16 spec/models/hubstats/comment_spec.rb
hubstats-0.3.15 spec/models/hubstats/comment_spec.rb
hubstats-0.3.14 spec/models/hubstats/comment_spec.rb
hubstats-0.3.13 spec/models/hubstats/comment_spec.rb
hubstats-0.3.12 spec/models/hubstats/comment_spec.rb
hubstats-0.3.11 spec/models/hubstats/comment_spec.rb
hubstats-0.3.10 spec/models/hubstats/comment_spec.rb
hubstats-0.3.9 spec/models/hubstats/comment_spec.rb
hubstats-0.3.8 spec/models/hubstats/comment_spec.rb
hubstats-0.3.7 spec/models/hubstats/comment_spec.rb
hubstats-0.3.6 spec/models/hubstats/comment_spec.rb