Sha256: e5837a36a0e82274dfb46e5220fe8e072ca22f2cfe96575c73eb4b726282e99c

Contents?: true

Size: 929 Bytes

Versions: 4

Compression:

Stored size: 929 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(github_comment[:id])
      expect(comment.user_id).to eq(github_user[:id])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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